Npm update errors?


#1

I have an old version of particle-cli (haven’t been developing for over a year), so I tried to update it using the documented instructions:
“$ npm update -g particle-cli” on a Windows 10 platform from the command prompt.

A lot of stuff happened, but the lines logged to the console make me think the update failed. They are listed below. I see errors about can’t find Python, bad platform, etc. I suspect I may be missing some other utilties (node.js, dfu-util, openssl?) but not sure how to check for them - I would assume that I had installed them previously though. I’d like to understand a little more about the software stack that we use for particle.io projects (Photon, Electron in my case), where it is all installed, how to check the status of it, if possible. I know I can try to clean it all off and start from scratch as a last resort, but I’m not even sure how to do that. Any thoughts would be helpful.

Regards,
-SB

Blockquote
4.7",“npm”:“2.15.8”})
npm WARN engine eslint-utils@1.3.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine espree@5.0.1: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine istanbul-lib-instrument@3.3.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine execa@2.0.4: wanted: {“node”:"^8.12.0 || >=9.7.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @babel/parser@7.4.3: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine istanbul-lib-report@2.0.8: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine istanbul-lib-source-maps@3.0.6: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine prebuild-install@5.3.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine json5@2.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine nyc@14.1.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine inquirer@6.5.2: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine regexpp@2.0.1: wanted: {“node”:">=6.5.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine istanbul-reports@2.2.6: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @serialport/bindings@2.0.8: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine fs-extra@8.1.0: wanted: {“node”:">=6 <7 || >=8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @babel/core@7.5.5: wanted: {“node”:">=6.9.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine particle-usb@0.5.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine table@5.2.3: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine mocha@6.2.0: wanted: {“node”:">= 6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine usb@1.6.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine eslint@5.16.0: wanted: {“node”:"^6.14.0 || ^8.10.0 || >=9.10.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine locate-path@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine find-up@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-locate@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-limit@2.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine pify@4.0.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine locate-path@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine find-up@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-locate@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine read-pkg-up@4.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-limit@2.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine mimic-fn@2.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine path-key@3.1.0: wanted: {“node”:">=8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine pify@4.0.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})

spawn-sync@1.0.15 postinstall C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\spawn-sync
node postinstall

npm WARN engine slash@2.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine supports-color@6.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine mimic-fn@2.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine cross-spawn@6.0.5: wanted: {“node”:">=4.8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine is-stream@2.0.0: wanted: {“node”:">=8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine onetime@5.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine get-stream@5.1.0: wanted: {“node”:">=8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine cross-spawn@6.0.5: wanted: {“node”:">=4.8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> …/…/…/ie8-polyfill.js
npm WARN engine strip-ansi@5.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine locate-path@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine find-up@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-locate@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-limit@2.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine os-locale@3.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine get-stream@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine lcid@2.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine execa@1.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine cross-spawn@6.0.5: wanted: {“node”:">=4.8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine har-validator@5.1.3: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})

@serialport/bindings@2.0.8 install C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules@serialport\bindings
prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=4.4.7 runtime=node arch=ia32 libc= platform=win32)

C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules@serialport\bindings>if not defined npm_config_node_gyp (node “D:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “” rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack at D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command “D:\Program Files (x86)\nodejs\node.exe” “D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules@serialport\bindings
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN engine ansi-regex@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-locate@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine find-up@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine locate-path@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine ansi-regex@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine string-width@3.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine wrap-ansi@5.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-limit@2.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine strip-ansi@5.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine get-caller-file@2.0.5: wanted: {“node”:“6.* || 8.* || >= 10."} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine punycode@2.1.1: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @babel/parser@7.5.5: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @babel/parser@7.5.5: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @babel/parser@7.5.5: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine @babel/parser@7.5.5: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> …/…/…/ie8-polyfill.js
npm WARN engine ansi-regex@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine string-width@3.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine strip-ansi@5.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine find-up@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-locate@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine locate-path@3.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine os-locale@3.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine get-stream@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine p-limit@2.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine lcid@2.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine supports-color@6.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine get-caller-file@2.0.5: wanted: {“node”:"6.
|| 8.* || >= 10.*”} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine execa@1.0.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine cross-spawn@6.0.5: wanted: {“node”:">=4.8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> …/…/…/ie8-polyfill.js
npm WARN engine @babel/parser@7.5.5: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})

protobufjs@6.8.8 postinstall C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\protobufjs
node scripts/postinstall

usb@1.6.0 install C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\usb
prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.0
prebuild-install info looking for cached prebuild @ C:\Users\Randy\AppData\Roaming\npm-cache_prebuilds\56f2bd-usb-v1.6.0-node-v46-win32-ia32.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v46-win32-ia32.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v46-win32-ia32.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=4.4.7 runtime=node arch=ia32 libc= platform=win32)

C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\usb>if not defined npm_config_node_gyp (node “D:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “” rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can’t find Python executable “python”, you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack at D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:356:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command “D:\Program Files (x86)\nodejs\node.exe” “D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
cwd C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\usb
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> …/…/…/ie8-polyfill.js
npm WARN excluding symbolic link test\server\static\ie8-polyfill.js -> …/…/…/ie8-polyfill.js
npm WARN engine ansi-regex@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine string-width@3.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine strip-ansi@5.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine cross-spawn@6.0.5: wanted: {“node”:">=4.8"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine inquirer@6.3.1: wanted: {“node”:">=6.0.0"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine ansi-regex@4.1.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
npm WARN engine strip-ansi@5.2.0: wanted: {“node”:">=6"} (current: {“node”:“4.4.7”,“npm”:“2.15.8”})
|

core-js@3.2.1 postinstall C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\core-js
node scripts/postinstall || echo “ignore”

core-js-pure@3.1.4 postinstall C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules\core-js-pure
node scripts/postinstall || echo “ignore”

core-js@2.6.9 postinstall C:\Users\Randy\AppData\Roaming\npm\node_modules\particle-cli\node_modules@babel\runtime-corejs2\node_modules\core-js
node scripts/postinstall || echo “ignore”

npm ERR! Windows_NT 10.0.18362
npm ERR! argv “D:\Program Files (x86)\nodejs\node.exe” “D:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js” “update” “-g” “particle-cli”
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: ia32

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Randy\npm-debug.log

C:\Users\Randy>


#2

On Windows you should not use npm but the Windows installer and once installed just run particle update-cli.

However, when you already used npm you should remova all instances of CLI and reinstall fresh with the installer.


#3

Thank you, I seem to be able to use CLI now. But I’m having curious problem getting “Flash An Led” code to work. I will post a separate thread.