Can't compile code for the Electron anymore

Hi,
since the update to the Firmware 1.1.0 I’ve a problem with the CLI.
When I try to compile some code with the command:
sudo /root/bin/particle compile electron /home/roli/SVN/Electron/projects/Stockwaage–saveTo electron_firmware.bin
I get the output:
particle: Installing plugins…npm ERR! 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. On the other hand, if you’re debugging an issue with the installer, you can use npm install --cache /tmp/empty-cache to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you’re sure you want to delete the entire cache, rerun this command with --force.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.particle/.npm-cache/_logs/2019-05-26T18_29_23_075Z-debug.log

▸ exit status 1
particle: Installing plugins (retrying)…
▸ Error installing package.
▸ sh: 1: prebuild-install: Permission denied
▸ sh: 1: node-gyp: Permission denied
▸ npm WARN enoent ENOENT: no such file or directory, open ‘/root/.particle/package.json’
▸ npm WARN .particle No description
▸ npm WARN .particle No repository field.
▸ npm WARN .particle No README data
▸ npm WARN .particle No license field.
▸ npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/particle-cli/node_modules/fsevents):
▸ npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

▸ npm ERR! file sh
▸ npm ERR! code ELIFECYCLE
▸ npm ERR! errno ENOENT
▸ npm ERR! syscall spawn
▸ npm ERR! @serialport/bindings@2.0.7 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
▸ npm ERR! spawn ENOENT
▸ npm ERR!
▸ npm ERR! Failed at the @serialport/bindings@2.0.7 install script.
▸ npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

▸ npm ERR! A complete log of this run can be found in:
▸ npm ERR! /root/.particle/.npm-cache/_logs/2019-05-26T18_30_50_719Z-debug.log

▸ Try running again with GODE_DEBUG=info to see more output.

in the log file is:
0 info it worked if it ends with ok
1 verbose cli [ ‘/root/.particle/node-v8.15.0-linux-x64/bin/node’,
1 verbose cli ‘/root/.particle/node-v8.15.0-linux-x64/lib/node_modules/npm/bin/npm-cli.js’,
1 verbose cli ‘cache’,
1 verbose cli ‘clean’ ]
2 info using npm@6.4.1
3 info using node@v8.15.0
4 verbose npm-session 3cdc460da38c91aa
5 verbose stack Error: 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. On the other hand, if you’re debugging an issue with the installer, you can use npm install --cache /tmp/empty-cache to use a temporary cache instead of nuking the actual one.
5 verbose stack
5 verbose stack If you’re sure you want to delete the entire cache, rerun this command with --force.
5 verbose stack at clean (/root/.particle/node-v8.15.0-linux-x64/lib/node_modules/npm/lib/cache.js:72:22)
5 verbose stack at EventEmitter.cache (/root/.particle/node-v8.15.0-linux-x64/lib/node_modules/npm/lib/cache.js:47:16)
5 verbose stack at Object.commandCache.(anonymous function) (/root/.particle/node-v8.15.0-linux-x64/lib/node_modules/npm/lib/npm.js:159:13)
5 verbose stack at EventEmitter. (/root/.particle/node-v8.15.0-linux-x64/lib/node_modules/npm/bin/npm-cli.js:131:30)
5 verbose stack at _combinedTickCallback (internal/process/next_tick.js:132:7)
5 verbose stack at process._tickCallback (internal/process/next_tick.js:181:9)
6 verbose cwd /root/.particle
7 verbose Linux 4.9.0-9-amd64

Does anyhow know hoe I can solve this Issue?

Roli

Have you tried compiling against the web ide?

Yes, compiling over the Web Site is working. I think I’ve some trouble with the CLI.

1 Like

Try updating your CLI to the newest version, using either the windows installer (if on windows) or search for CLI update in the forum, I can’t remember the command for it.

Depending on the currently version you can try particle update-cli (on all OSs) or for older non-Windows installations it would be npm update -g particle-cli

1 Like

that solved the problem. THX