[SOLVED] Errors on Building PlayCanvas

Running the command npm install, gets the following error

7507 verbose unlock done using C:…\AppData\Roaming\npm-cache_locks\staging-aac59ceaa0e24401.lock for E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0\node_modules.staging
7508 verbose stack Error: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== integrity checksum failed when using sha512: wanted sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== but got sha512-4vblSSsJmLyxbecKTHMdlAoA4+NILwq9PTYL9ib7bIafzp2IBSuy7g5t7pf2i4mQOq+Kgw6gxrqzrt7dKyvHFA==. (4557104 bytes)
7508 verbose stack at Transform.on (C:…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\ssri\index.js:275:19)
7508 verbose stack at emitNone (events.js:111:20)
7508 verbose stack at Transform.emit (events.js:208:7)
7508 verbose stack at endReadableNT (_stream_readable.js:1056:12)
7508 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
7508 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
7509 verbose cwd E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0
7510 verbose Windows_NT 6.3.9600
7511 verbose argv “C:\…\AppData\Roaming\nvm\v8.9.1\node.exe” “C:\…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\bin\npm-cli.js” “install”
7512 verbose node v8.9.1
7513 verbose npm v5.5.1
7514 error code EINTEGRITY
7515 error sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== integrity checksum failed when using sha512: wanted sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== but got sha512-4vblSSsJmLyxbecKTHMdlAoA4+NILwq9PTYL9ib7bIafzp2IBSuy7g5t7pf2i4mQOq+Kgw6gxrqzrt7dKyvHFA==. (4557104 bytes)
7516 verbose exit [ 1, true ]

What does this mean, and how can itt be fixed?

Hi @Jaay and welcome,

Where are you running that command? Can you share some details about your setup?

1 Like

Something with your local npm cache. Try npm cache verify and try again.

1 Like

@Jaay I have seen this issue before. I believe what is happening is there is a checksum issue with your node_modules. What I have done in the past was delete the node_modules folder and then redo npm install. PLEASE READ BELOW FIRST

This May Help: @LeXXik << This includes your suggestion above.

1 Like

@Leonidas thanks.
I opened a command prompt in the root directory of PlayCanvas, and ran npm install.

The problem appears to be as Tirk182 suggested, because I got the said error, his link refers to.

npm ERR! code EINTEGRITY
npm ERR! sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEh
YvONq5pkC2Y9oPljWToLmQ== integrity checksum failed when using sha512: wanted sha
512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9
oPljWToLmQ== but got sha512-4vblSSsJmLyxbecKTHMdlAoA4+NILwq9PTYL9ib7bIafzp2IBSuy
7g5t7pf2i4mQOq+Kgw6gxrqzrt7dKyvHFA==. (4557104 bytes)

@LeXXik I ran npm cache verify, and got this:

Cache verified and compressed (~\AppData\Roaming\npm-cache_cacache):
Content verified: 1663 (137925867 bytes)
Content garbage-collected: 92 (6407630 bytes)
Index entries: 2382
Finished in 256.234s

I notice that’s a step recommended in a possible workaround, in the link Tirk182 posted. Thanks.

Possible workarounds to fix this issue:

  1. To avoid any package creating a conflict in your local system,
  • Remove the node_modules and _cache folder from the .npm location along with the package.json file.
  • Run “npm cache clean –force” command in order to clean the local npm cache.
  • Next run “npm cache verify”
  • Try ‘npm update’
  • Run ‘npm install –verbose’
  1. If there is still no change, delete the package from Artifactory remote cache, right click on the repository, perform zap cache and try to install the package.

I just have to back up my node_modules directory, and will try these steps, if it fails on a second attempt.
Thanks Tirk.

1 Like

After cache verify, I ran the install command, and didn’t get an error. Only warnings.

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

added 615 packages in 428.429s

Does that mean everything is okay now?

Hello @Jaay,

Since these are only warnings they should not affect the installation of modules. You should be good. Please reach out if you run into any further issues.

Those are safe, if you are running it under Windows. It is an issue, if you get them under Ubuntu or Mac.

2 Likes

Thanks all, for your help.
Now, I am getting errors on npm run build

npm run build

playcanvas@1.56.0 build E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0
rollup -c

E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0\node_modules\rollup\dist\shared\loadConfigFile.js:544
return import(pluginPath);
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions…js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Module. (E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0\node_modules\rollup\dist\bin\rollup:22:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! playcanvas@1.56.0 build: rollup -c
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the playcanvas@1.56.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

log

9 verbose lifecycle playcanvas@1.56.0~build: CWD: E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0
10 silly lifecycle playcanvas@1.56.0~build: Args: [ ‘/d /s /c’, ‘rollup -c’ ]
11 silly lifecycle playcanvas@1.56.0~build: Returned: code: 1 signal: null
12 info lifecycle playcanvas@1.56.0~build: Failed to exec build script
13 verbose stack Error: playcanvas@1.56.0 build: rollup -c
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid playcanvas@1.56.0
15 verbose cwd E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0
16 verbose Windows_NT 6.3.9600
17 verbose argv “C:\…\AppData\Roaming\nvm\v8.9.1\node.exe” “C:\…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\bin\npm-cli.js” “run” “build”
18 verbose node v8.9.1
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error playcanvas@1.56.0 build: rollup -c
22 error Exit status 1
23 error Failed at the playcanvas@1.56.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@poliveira are there any version requirements for building 1.56 as far as node and npm are concerned? I didn’t see any on GitHub but maybe I am not viewing this log correctly. I see.

I don’t know if this stackoverflow is relevent but I see a simular pattern.

EDIT:I do see updated npm dependencies on GitHub.

Seems everyone recommends the workaround.
I tried. After deleting the node_modules folder I get this
npm cache clean –force
module.js:538
throw err;
^

Error: Cannot find module ‘C:…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\bin\npm-cli.js’
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
module.js:538
throw err;
^

Error: Cannot find module ‘C:…\AppData\Roaming\nvm\v8.9.1\node_modules\npm\bin\npm-cli.js’
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

I’ll try the other way to install PlayCanvas/ This method seems problematic on some pcs and it hurts :face_with_head_bandage: when I have to go through these system “adjustments” in order to install software.
Some really prove too difficult. My system may need some fixing, but I’ll have to check that out later

I downloaded the binaries, and ran node playcanvas-latest.js.
I thought the editor would open, but nothing happens. :frowning_face:

Seems like a good engine to use, but… :anguished:

Odd that you are getting these issues as we work with the engine every day. What version of node are you using?

The Editor is not part of the engine. The Editor and the full toolchain is not opensource.

https://github.com/playcanvas/engine is just the engine. You can see an example of use with the engine here: https://github.com/playcanvas/engine#usage

Perhaps I am getting issues with linking. I am using nvm, .
I’m looking into it - removing node, and installing them again from nvm.
I’ll get back to you on how things go after.

I’ve just tried this on my spare Windows 10 PC.

I installed Node 16.17.0 LTS from here: Node.js

Downloaded engine repo from main branch

Unzipped it in my downloads folder

On commandline, changed directory to that folder. Ran npm i and npm run build and it all just worked first time.

All engine versions were built.

1 Like

Okay. I cleaned up node, and did a fresh install.
I guess that’s why it’s good to try new things even if difficult, since they can help fix problems.
Thanks for the help.

Everything seemed to install and build okay.

E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0>npm install

added 614 packages, and audited 615 packages in 4m

79 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0>npm run docs

playcanvas@1.56.0 docs
jsdoc -c conf-api.json

E:\GameDevelopment\otherGameEngines\PlayCanvas\engine-1.56.0>npm run build:release

playcanvas@1.56.0 build:release
rollup -c --environment target:release

fatal: not a git repository (or any of the parent directories): .git

src/index.js → build/playcanvas.js…
(!) Circular dependencies
src/graphics/render-target.js → src/graphics/graphics-device.js → src/graphics/program-library.js → src/scene/materials/standard-material.js → src/graphics/env-lighting.js → src/graphics/reproject-texture.js → src/graphics/render-target.js
src/graphics/graphics-device.js → src/graphics/program-library.js → src/scene/materials/standard-material.js → src/graphics/env-lighting.js → src/graphics/reproject-texture.js → src/graphics/graphics-device.js
src/framework/script.js → src/resources/script.js → src/framework/script.js
…and 5 more
created build/playcanvas.js in 1m 13.3s

src/index.js → build/playcanvas.mjs…
(!) Circular dependencies
src/graphics/render-target.js → src/graphics/graphics-device.js → src/graphics/program-library.js → src/scene/materials/standard-material.js → src/graphics/env-lighting.js → src/graphics/reproject-texture.js → src/graphics/render-target.js
src/graphics/graphics-device.js → src/graphics/program-library.js → src/scene/materials/standard-material.js → src/graphics/env-lighting.js → src/graphics/reproject-texture.js → src/graphics/graphics-device.js
src/framework/script.js → src/resources/script.js → src/framework/script.js
…and 5 more
created build/playcanvas.mjs in 30.2s

The thing is, I don’t understand how to use the engine, or editor.
Should I download the editor also? How do I use it?
All the getting started tutorials begin with the editor opened.

Does this mean that files must be downloaded, and built, but then one must go online to create projects, and cannot work offline?

Do I need to go here, to get started?
Am I getting this message because I need to use another account besides the one I am using on the forums?
loginErr

Sorry, I have many questions, as I am totally clueless.

Hi @Jaay, I think that there has been a mis understanding here. It appears that you have only joined the forum several days ago. @yaustar … Please feel free to correct the following statements as I think I now understand what may be the issue in understanding.

There is a online fully functional web based development platform(Editor/Runtime) for using the Playcanvas engine. Everything is hosted for you and there is no need build all of the stuff provided in GitHub(Disclamer…Unless your user case requires it).

Simply go to Playcanvas.com and create an account as you pointed out above. With the free no strings attached account you will be able to use the editor and create your game/or 3d/2d application. All of your resources/asserts can be managed within your project space and there are numerous YouTube videos out there. Keep in mind for the free account you will be limited to 1G of cloud storage. There is a affordable membership tier fee system that you can look at if you need more storage. Also, with free is that you can create as many projects as you want but, in total for free is only 1G of storage.

Everything you need is hosted in the cloud so you can get to it at any time with any web browser based device.

Also, there are all the tools included in your project space to run your code in debug, publish your code to the Playcanvas server, and Download all of your project including engine to self host any where you want.

Playcanvas YouTube channel has a lot of starter videos:

Also:
https://developer.playcanvas.com/en/tutorials/

1 Like

Thanks Tirk. The downloads got me, I guess.
What are the downloads for, if they can’t be used to do what the online tools do?

@Jaay I think there are a bunch of use cases for having the sources published. I don’t know all but… here are some. I have seen in the past that some users including the Playcanvas folks create extensions to the editor. Nice to have the sources to debug your custom extension. Also, I do think that there are developer groups that build their own proprietary games and host their own in-house development servers. Finally because the sources are public it gives a large advantage to the community to actually see the guts of all and possibly create a feature branch which will be beneficial to all in maybe bug fix or cool new feature.

Hope you stick with Playcanvas. Check out this great showcase.

Thanks. The engine does look inviting, but I prefer working offline, so I will use something else instead. I’m looking at LibGDX, along with an engine which requires just a bit of programming.
Thanks all for the assistance.
Your community is very helpful. I like the quick response.