[SOLVED] I can't build the engine (1.52.2)

Hi, I’m trying to build the latest version of the engine (1.52.2), but I can’t get it to work. I always get this error:

I can build the previous version (1.51.7) without any problems.
Can anyone help? Thanks.

Have you done npm i to install new packages?

Otherwise @will , can you help as you are on Windows?

I saw somebody else have this problem earlier this week. They said:

It doesn’t seem to work via “Windows Command Prompt”. However, just now I’ve managed to workaround this Issue using MINGW64.

I’m using Windows Command Prompt and it works fine though. It feels like a Node version or configuration problem perhaps.

Unfortunately, it’s still not working for me. I installed the newest version of node and it still the same. I can build the previous version of the engine without a problem. I just need to get a new version of playcanvas.d.ts. Could someone please build it for me? Thanks.

I’ve sent you the latest one from the master repo in a PM.


this is the current node version we internally use to build the engine: 14.19.0

1 Like

I just tried on Win 11 power shell with node 16.13.2 and npm 8.3.2 - builds ok.


I have node 16.14.0 and npm 8.3.1, Win10 and Win11 (I have two computers). Both computers can build version 1.51.7 and any lower, but neither can build the version 1.52.2. Something must have changed :frowning: . Isn’t something else needed besides node and npm?

The error is still the same: “SyntaxError: Cannot use import statement outside a module in engine-release-1.52\rollup.config.js:1 import babel from ‘@rollup/plugin-babel’;” but the previous version (1.51.7) of rollup.config.js also use imports.

@will or @Elliott might have some ideas?

@NokFrt I am not sure what you use, but in case you use Command Prompt, could you please try any other? For example, if you install Git for Windows, it comes together with Git Bash. Another option is Power Shell, which I think comes together with recent Windows version.

Thank you. Problem is solved. Git Bash built it successfully. I always used Command Promt and I tried Power Shell - both can’t build it. But Git Bash can :slight_smile:

BTW npm run tsd doesn’t work anymore. I had to use npm run “build:types”. I’d be good to fix this in README file.

Fixed here:

Thanks for pointing that out!! :pray: