NPM 5 NodeJS 9 Build Errors

support
raspberrypi3
docker

#1

Having trouble installing one of the latest nodes (version 9.11.1).

Everything seems to install but then I get a strange error after, check it out:

[main]  npm notice created a lockfile as package-lock.json. You should commit this file.
[main]
[main]  npm WARN bos-server@0.0.1 No repository field.
[main]
[main]
[main]
[main]  added 556 packages in 27.532s
[main]  npm
[main]   ERR!
[main]   As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
[main]  npm ERR!
[main]
[main]  npm
[main]
[main]  ERR!
[main]   If you're sure you want to delete the entire cache, rerun this command with --force.
[main]
[main]
[main]  npm
[main]   ERR!
[main]   A complete log of this run can be found in:
[main]
[main]  npm
[main]  ERR!
[main]       /root/.npm/_logs/2018-05-09T21_11_47_317Z-debug.log
[main]
[main]  Removing intermediate container ffcaf6495ce1
[main]  The command '/bin/sh -c JOBS=MAX npm install --production --unsafe-perm && npm cache clean && rm -rf /tmp/*' returned a non-zero code: 1
[Info]  Uploading images
[Success]  Successfully uploaded images
[Error]  Some services failed to build:
[Error]    Service: main
[Error]      Error: The command '/bin/sh -c JOBS=MAX npm install --production --unsafe-perm && npm cache clean && rm -rf /tmp/*' returned a non-zero code: 1
[Error]  Not deploying release.

Any ideas?


#4

Hey, the problem is that you’ve used npm cache clean in order to make your image smaller which is great for npm 4 and below, but generates that error with npm 5 - to get the same effect for npm 5 you have to use npm cache clean --force