Hello!
Although I had some issues installing the particle CLI at the begining I was happily using it until today. Now when I try to run particle-setup (on Windows 10 cmd), it asks me for my user/pass but then I get a message saying that I need to reinstall particle-cli and the program hangs. I’ve tried to run npm install -g particle-cli
as suggested but no luck I was getting this error:
> serialport@6.2.0 install C:\Users\Dani\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
> prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=10.15.0 runtime=node arch=x64 platform=win32)
C:\Users\Dani\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Users\Dani\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\Dani\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Dani\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Dani\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Dani\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@6.2.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@6.2.0 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! C:\Users\Dani\AppData\Roaming\npm-cache\_logs\2019-03-01T13_52_12_222Z-debug.log
C:\Users\Dani>particle --version
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'C:\Users\Dani\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
C:\Users\Dani>npm view particle-cli
I saw that there was an update (1.39.0) pushed a few days ago.
Then I’ve uninstalled particle cli from Windows’ programs and preferences, because npm uninstall particle-cli
was not working. Now I try to install it again using npm install -g particle-cli
and I’m getting the same error. I searched for this error accross the forum and tried solutions like npm install --unsafe-perm -g particle-cli
, manually installing serialport… but nothing helped. Not sure what to do next… I was in a hurry and it failed when I needed it the most. Any help will be welcomed!