[SOLVED]CLI installation on Windows MUST be easier than this......PLEASE?

Hi,

OK - so - bashing my head against a brick wall once again.

Made the mistake of running running NPM upgrade - when particle list refused to list 3 'variables' for one of my photons.

upgrade failed, install now fails and I am back to (pre) stage 1 again :open_mouth: - no CLI at all.

Might be a 'red herring' BUT in hindsight its possibly because of a windows driver clash. I have a Python-based 3D printer program (pronterface) which was originally set up to use an FTDI driver on Com3. Seems that this was trashed when I installed the CLI some weeks/months back and it grabbed Com3.

Then I needed to use the printer again (a couple of weeks back) - and had to re-install the FTDI driver - which looks like it trashed the CLI driver settings :frowning: - such that CLI now refuses to install again. I ended up then in changing CLI to use Com5 and 'most' of it worked - except for the Serial port in Dev - so I just stopped using it and reverted to RealTerm instead - which seems perfectly happy to talk to a photon :open_mouth:

I 'assume' that I now need to uninstall everything and then re-install, and I guess I will have to do this every time I need to use my 3D printer.

What I fail to understand is WHY the CLI stuff insists on having its own USB drivers installed - when the FTDI ones do a GREAT job, and don't clash with anything else. Basically it seems to have insisted on taking over Com3 (which had the FTDI driver) and stomping on the drivers in there ???? - why ??. They should really be able to live side-by-side....

So I give up for tonight. Re-ran the zadig app found my photon in DFU mode and installed libusb as directed :-O. Just the same set of errors installing SerialPort 2.0.4 ???

Rebooted and its still just the same.....

Running out of ideas now - this is all way too much of a 'black art' :open_mouth:

Any help most welcome - in the morning now though. Basically all photon development grinds to a halt now until I can get this talking again.....

Graham

In case it helps screen is as below.....

C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" co
nfigure --fallback-to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_mo
dules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32\ser
ialport.node --module_name=serialport --module_path=C:\Users\Graham\AppData\Roam
ing\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14
-win32-ia32 ) else (node configure --fallback-to-build --module=C:\Users\Graha
m\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Re
lease\node-v14-win32-ia32\serialport.node --module_name=serialport --module_path
=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seri
alport\build\Release\node-v14-win32-ia32 )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files (x86)\nodejs\node_modules\n
pm\node_modules\node-gyp\lib\configure.js:114:14)
gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_module
s\node-gyp\lib\configure.js:69:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--modu
le=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_mo
dules\serialport\build\Release\node-v14-win32-ia32\serialport.node" "--modu
le_name=serialport" "--module_path=C:\Users\Graham\AppData\Roaming\npm\nod
e_modules\particle-cli\node_modules\serialport\build\Release\node-v14-win3
2-ia32"
gyp ERR! cwd C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_
modules\serialport
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallb
ack-to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-
cli\node_modules\serialport\build\Release\node-v14-win32-ia32\serialport.node --
module_name=serialport --module_path=C:\Users\Graham\AppData\Roaming\npm\node_mo
dules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32' (1
)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Graham\AppData
\Roaming\npm\node_modules\particle-cli\node_modules\serialport\node_modules\node
-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_proces
s.js:1087:5)
node-pre-gyp ERR! System Windows_NT 6.3.9600
node-pre-gyp ERR! command "node" "C:\Users\Graham\AppData\Roaming\npm\node
_modules\particle-cli\node_modules\serialport\node_modules\node-pre-gyp\bi
n\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-
cli\node_modules\serialport
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.13
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users
Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\bui
ld\Release\node-v14-win32-ia32\serialport.node --module_name=serialport --module
_path=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules
\serialport\build\Release\node-v14-win32-ia32' (1)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "particle-cli"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! serialport@2.0.4 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.4 install script 'node-pre-gyp install --f
allback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.

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

C:\Windows\system32>

There’s an error: Can't find Python executable "python", you can set the PYT

Did you install the dependencies? https://github.com/voodootikigod/node-serialport#windows

Hi,
Well I didn’t uninstall them. It was working earlier today - well yesterday now…
I had Python installed but now its not there - and I certainly don’t recall uninstalling it :open_mouth:

OK so I downloaded and installed Python, set the environment variables, ran the installer and still just the same.

So I ran it again from an MSVC command prompt - just the same - again.

NB I have VS 2013 Pro already installed so did NOT install Express :-O.

I really fail to understand why this is now a problem, although I am performing a ‘repair’ of my VS2013 installation - as msbuild was not on my path, and when adding it again it still refused to build.

Think my laptop is heading for a total rebuild soon :-O.

I’ll get back in the morning as VS will take forever to refresh its status :-O.

Thanks for the pointers though. I must admit that I didn’t see the errors you pointed out - probably because there was simply too much CR*P on the screen - which makes it overwhelming :open_mouth:

BR
Graham

OK,

So here we are - still - I rebuilt my VS2013 environment, and still get the same old error. Looks (to me) like a bug in the compiler commands....WHY do we have to rebuild on the target machine anyway :open_mouth: - surely we would ALL be way better off with pre-built binaries ????. Any way - looking at the output - there is now a section (in RED) which complains (wrongly IMO) about msbuild V140 not being installed. It says

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t
argets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140
') cannot be found. To build using the v140 build tools, please install v140 bu
ild tools. Alternatively, you may upgrade to the current Visual Studio tools b
y selecting the Project menu or right-click the solution, and then selecting "U
pgrade Solution...". [C:\Users\Graham\AppData\Roaming\npm\node_modules\particle
-cli\node_modules\serialport\build\serialport.vcxproj]

Well - actually there IS a folder called V140 but this diag print suggests that the command is being run from the V120 folder - which could be WHY it can't run V140 ???.

So I did what it says and tried to build from the suggested folder - BUT - that folder ([C:\Users\Graham\AppData\Roaming\npm\node_modules) no longer exists - because its been rolled back maybe :-O. All I have in the npm folder is an 'etc.' folder :-O.

So - do I need o contact the 'serialport' coder (as suggested) :open_mouth: - or is this actually a problem in the CLI build process.

If the 'automated' build doesn't work, can I not simply download the solution and rebuild withing VS2013 ????.

Sorry but this really is a nightmare :-((.

See below for npm output.....

Thanks hopefully once more :wink:

BR
Graham

C:\Windows\system32>npm install -g particle-cli
|
serialport@2.0.4 install C:\Users\Graham\AppData\Roaming\npm\node_modules\part
icle-cli\node_modules\serialport
node-pre-gyp install --fallback-to-build

C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" cl
ean ) else (node clean )

C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" co
nfigure --fallback-to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_mo
dules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32\ser
ialport.node --module_name=serialport --module_path=C:\Users\Graham\AppData\Roam
ing\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14
-win32-ia32 ) else (node configure --fallback-to-build --module=C:\Users\Graha
m\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Re
lease\node-v14-win32-ia32\serialport.node --module_name=serialport --module_path
=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seri
alport\build\Release\node-v14-win32-ia32 )

C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" bu
ild --fallback-to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_module
s\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32\serialp
ort.node --module_name=serialport --module_path=C:\Users\Graham\AppData\Roaming
npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14-win
32-ia32 ) else (node build --fallback-to-build --module=C:\Users\Graham\AppDat
a\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\no
de-v14-win32-ia32\serialport.node --module_name=serialport --module_path=C:\User
s\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\b
uild\Release\node-v14-win32-ia32 )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t
argets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140
') cannot be found. To build using the v140 build tools, please install v140 bu
ild tools. Alternatively, you may upgrade to the current Visual Studio tools b
y selecting the Project menu or right-click the solution, and then selecting "U
pgrade Solution...". [C:\Users\Graham\AppData\Roaming\npm\node_modules\particle
-cli\node_modules\serialport\build\serialport.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess.handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C
:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_module
s\serialport\build\Release\node-v14-win32-ia32\serialport.node" "--module_n
ame=serialport" "--module_path=C:\Users\Graham\AppData\Roaming\npm\node_mo
dules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia
32"
gyp ERR! cwd C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node

modules\serialport
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-
to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli
node_modules\serialport\build\Release\node-v14-win32-ia32\serialport.node --modu
le_name=serialport --module_path=C:\Users\Graham\AppData\Roaming\npm\node_module
s\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Graham\AppData
\Roaming\npm\node_modules\particle-cli\node_modules\serialport\node_modules\node
-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_proces
s.js:1087:5)
node-pre-gyp ERR! System Windows_NT 6.3.9600
node-pre-gyp ERR! command "node" "C:\Users\Graham\AppData\Roaming\npm\node
_modules\particle-cli\node_modules\serialport\node_modules\node-pre-gyp\bi
n\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-
cli\node_modules\serialport
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.13
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\Grah
am\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\R
elease\node-v14-win32-ia32\serialport.node --module_name=serialport --module_pat
h=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\ser
ialport\build\Release\node-v14-win32-ia32' (1)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "particle-cli"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! serialport@2.0.4 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.4 install script 'node-pre-gyp install --f
allback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.

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

C:\Windows\system32>

Hi,
I have the same problem it seems (other post is [SOLVED]CLI installation on Windows MUST be easier than this......PLEASE? - #4 by GrahamS)

I also tried your suggestion of npm install -g serialport and that fails in a similar way to the full package.

I suggest that the install script is broken - as it seems to be asking for a V140 version of some MS tools when its in the V120 folder ????.

My system has in xxx\Microsoft.Cpp\V4.0 folder - V110, V120 and V140 folders.

The specific section in the forest of results - is in RED as follows

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t
argets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140
') cannot be found. To build using the v140 build tools, please install v140 bu
ild tools. Alternatively, you may upgrade to the current Visual Studio tools b
y selecting the Project menu or right-click the solution, and then selecting "U
pgrade Solution...". [C:\Users\Graham\AppData\Roaming\npm\node_modules\particle
-cli\node_modules\serialport\build\serialport.vcxproj]

This is now driving me to drink :-O.

ANY and all help gratefully accepted :smile:

BR
Graham

OK - so as a last desperate measure - I then tried to install the ‘toolchain’ :open_mouth:

Guess what - SAME error reported after grabbing the zip, extract, run ‘install-particle-cli.bat’ (from explorer)

screen pops up trying to install serialport and fails exactly as before…

So I opened up a ‘Developer command prompt for VS2013’ - as Administrator. Navigated to the toolchain folder and ran the bat file -

C:\Windows\system32>e:

E:\>cd\particle

E:\Particle>dir
 Volume in drive E is HwDev
 Volume Serial Number is 227B-CF26

 Directory of E:\Particle

12/11/2015  09:39    <DIR>          .
12/11/2015  09:39    <DIR>          ..
16/10/2015  13:02             5,622 Aardvark.html
07/10/2015  11:01    <DIR>          Atom
07/10/2015  16:33         2,643,606 CD00237391.pdf
09/10/2015  08:32                27 Devices_Test.txt
07/10/2015  11:55    <DIR>          dfu-util-0.8-binaries
11/11/2015  17:04    <DIR>          Driver
29/10/2015  16:47    <DIR>          Firmware
22/10/2015  11:07    <DIR>          firmware-develop
20/09/2015  22:44               653 FirstPage.html
22/10/2015  13:01            15,210 Glitch.PNG
02/11/2015  08:12            21,698 HP Photon settings mechanism.docx
30/10/2015  09:17             9,642 HP.html
30/10/2015  09:18             2,826 HP.zip
28/10/2015  10:02            12,473 HPPhoton settings template.xlsx
26/09/2015  15:33             2,845 index.html
14/10/2015  14:52               814 Jqm.html
21/09/2015  03:23    <DIR>          Libraries
17/10/2015  09:19               537 librato.json
16/10/2015  13:02             5,566 Meadowside.html
19/10/2015  11:38               114 MeadowsideSubscribe.cmd
13/10/2015  18:39             4,816 MikesGerbil.html
16/10/2015  15:31             6,581 NSL1.html
30/10/2015  12:21             1,316 NSL2_Settings.csv
30/10/2015  12:13            13,779 NSL2_Settings.xlsx
10/11/2015  17:40             2,520 NSL2_Test1.csv
02/11/2015  19:06             2,408 NSL2_Test2 - old.csv
04/11/2015  14:04             2,517 NSL2_Test2.csv
15/10/2015  11:50             1,616 NSLAudit.html
07/10/2015  09:16            14,287 Particle CLI.docx
07/10/2015  11:12    <DIR>          ParticleDev
12/11/2015  09:39    <DIR>          ParticleToolchainInstaller-master
10/11/2015  13:53    <DIR>          Projects
19/10/2015  17:27         1,471,611 sh1106_datasheet.pdf
21/10/2015  09:33            11,057 SoftI2CMaster-master.zip
07/10/2015  16:22           403,899 spark-pinout.png
09/10/2015  13:28         6,137,422 SPI I2C OLED DATASHEET.rar
09/10/2015  13:29    <DIR>          SPI-OLED(SSD1306)
19/10/2015  17:27         1,876,686 SSD1306.pdf
07/10/2015  12:01           249,148 system-part1-0.4.6-photon.bin
21/10/2015  10:08           249,740 system-part1-0.4.7-photon.bin
07/10/2015  12:01           168,048 system-part2-0.4.6-photon.bin
21/10/2015  10:08           169,832 system-part2-0.4.7-photon.bin
26/09/2015  15:33             2,845 VillaPool - Copy.html
29/09/2015  03:36             1,040 VillaPool.zip
11/11/2015  14:05             2,520 Voyager7_Test1.csv
07/10/2015  09:13               549 webhook.json
17/10/2015  08:57               258 webhook_Audit1.json
08/10/2015  14:34               258 webhook_Ph1.json
              38 File(s)     13,516,386 bytes
              12 Dir(s)  90,766,790,656 bytes free

E:\Particle>cd particletoolchaininstaller-master

E:\Particle\ParticleToolchainInstaller-master>install-particle-cli
'install-particle-cli' is not recognized as an internal or external command,
operable program or batch file.

E:\Particle\ParticleToolchainInstaller-master>dir
 Volume in drive E is HwDev
 Volume Serial Number is 227B-CF26

 Directory of E:\Particle\ParticleToolchainInstaller-master

12/11/2015  09:39    <DIR>          .
12/11/2015  09:39    <DIR>          ..
20/07/2015  13:25                22 .gitignore
20/07/2015  13:25               757 LICENSE
12/11/2015  09:39    <DIR>          Linux
20/07/2015  13:25             2,348 README.md
20/07/2015  13:25             2,466 sources.json
12/11/2015  09:40    <DIR>          Windows
               4 File(s)          5,593 bytes
               4 Dir(s)  90,766,790,656 bytes free

E:\Particle\ParticleToolchainInstaller-master>cd windows

E:\Particle\ParticleToolchainInstaller-master\Windows>install-particle-cli
|


> serialport@2.0.4 install C:\Users\Graham\AppData\Roaming\npm\node_modules\part
icle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

-
C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" cl
ean )  else (node  clean )
/
C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" co
nfigure --fallback-to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_mo
dules\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32\ser
ialport.node --module_name=serialport --module_path=C:\Users\Graham\AppData\Roam
ing\npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14
-win32-ia32 )  else (node  configure --fallback-to-build --module=C:\Users\Graha
m\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Re
lease\node-v14-win32-ia32\serialport.node --module_name=serialport --module_path
=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seri
alport\build\Release\node-v14-win32-ia32 )
/
C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\seria
lport>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\no
de_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" bu
ild --fallback-to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_module
s\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32\serialp
ort.node --module_name=serialport --module_path=C:\Users\Graham\AppData\Roaming\
npm\node_modules\particle-cli\node_modules\serialport\build\Release\node-v14-win
32-ia32 )  else (node  build --fallback-to-build --module=C:\Users\Graham\AppDat
a\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\Release\no
de-v14-win32-ia32\serialport.node --module_name=serialport --module_path=C:\User
s\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\b
uild\Release\node-v14-win32-ia32 )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.t
argets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140
') cannot be found. To build using the v140 build tools, please install v140 bu
ild tools.  Alternatively, you may upgrade to the current Visual Studio tools b
y selecting the Project menu or right-click the solution, and then selecting "U
pgrade Solution...". [C:\Users\Graham\AppData\Roaming\npm\node_modules\particle
-cli\node_modules\serialport\build\serialport.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\nod
e_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C
:\\Users\\Graham\\AppData\\Roaming\\npm\\node_modules\\particle-cli\\node_module
s\\serialport\\build\\Release\\node-v14-win32-ia32\\serialport.node" "--module_n
ame=serialport" "--module_path=C:\\Users\\Graham\\AppData\\Roaming\\npm\\node_mo
dules\\particle-cli\\node_modules\\serialport\\build\\Release\\node-v14-win32-ia
32"
gyp ERR! cwd C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_
modules\serialport
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-
to-build --module=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\
node_modules\serialport\build\Release\node-v14-win32-ia32\serialport.node --modu
le_name=serialport --module_path=C:\Users\Graham\AppData\Roaming\npm\node_module
s\particle-cli\node_modules\serialport\build\Release\node-v14-win32-ia32' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Graham\AppData
\Roaming\npm\node_modules\particle-cli\node_modules\serialport\node_modules\node
-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_proces
s.js:1087:5)
node-pre-gyp ERR! System Windows_NT 6.3.9600
node-pre-gyp ERR! command "node" "C:\\Users\\Graham\\AppData\\Roaming\\npm\\node
_modules\\particle-cli\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bi
n\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-
cli\node_modules\serialport
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.13
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\Grah
am\AppData\Roaming\npm\node_modules\particle-cli\node_modules\serialport\build\R
elease\node-v14-win32-ia32\serialport.node --module_name=serialport --module_pat
h=C:\Users\Graham\AppData\Roaming\npm\node_modules\particle-cli\node_modules\ser
ialport\build\Release\node-v14-win32-ia32' (1)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "particle-cli"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! serialport@2.0.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.4 install script 'node-pre-gyp install --f
allback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\Particle\ParticleToolchainInstaller-master\Windows\npm-debug.log


E:\Particle\ParticleToolchainInstaller-master\Windows>

Same old result :-((.

All out of ideas now…

Thanks
Graham

Sorry - should have said

Windows 8.1 x64 on a Dell Laptop.

VS2013 Pro install (and repaired last night). Also VS2015 installed but not yet run and tested - never got that far :-O.

CLI was working up until yesterday when I tried an update = BIG mistake !!!.

Graham

@GrahamS, do you remember the version of the last known working one of yours?

Hi,
I have no idea - or even how I would have found the version :-O. In my download folder though I do have three particle zip files, one being yesterday, so it would be from September 20th or October 16th.
I would have originally got this working in September, then MAY have updated in October as i talked a colleague through installing it on his Windows 10 laptop.

Hope this helps…

I am currently using the Dev environment - but thats not as easy as CLI for adding and configuring new photons…

Thanks

Graham

Can you try npm install -g serialport --verbose and see what happens?

Hi,

From an Admin prompt I get the following

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>npm install -g node-serialport --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\Program Files (x86)\nodejs\\node.exe',
npm verb cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli
.js',
npm verb cli 'install',
npm verb cli '-g',
npm verb cli 'node-serialport',
npm verb cli '--verbose' ]
npm info using npm@2.11.3
npm info using node@v0.12.7
npm verb install initial load of C:\Users\Graham\AppData\Roaming\npm\package.jso
n
npm verb readDependencies loading dependencies from C:\Users\Graham\AppData\Roam
ing\npm\package.json
npm verb cache add spec node-serialport
npm verb addNamed "*" is a valid semver range for node-serialport
npm verb addNameRange registry:https://registry.npmjs.org/node-serialport not in
flight; fetching
npm verb request uri https://registry.npmjs.org/node-serialport
npm verb request no auth needed
npm info attempt registry request try #1 at 8:20:00 AM
npm verb request id 0bc34bc63f0be578
npm http request GET https://registry.npmjs.org/node-serialport
npm http 404 https://registry.npmjs.org/node-serialport
npm verb headers { 'content-type': 'application/json',
npm verb headers 'cache-control': 'max-age=0',
npm verb headers 'content-length': '2',
npm verb headers 'accept-ranges': 'bytes',
npm verb headers date: 'Fri, 13 Nov 2015 08:20:02 GMT',
npm verb headers via: '1.1 varnish',
npm verb headers age: '0',
npm verb headers connection: 'keep-alive',
npm verb headers 'x-served-by': 'cache-ord1729-ORD',
npm verb headers 'x-cache': 'MISS',
npm verb headers 'x-cache-hits': '0',
npm verb headers 'x-timer': 'S1447402802.244487,VS0,VE75' }
npm verb stack Error: Registry returned 404 for GET on https://registry.npmjs.or
g/node-serialport
npm verb stack at CachingRegistryClient. (C:\Program Files (x86)
nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:239:14)
npm verb stack at Request.callback (C:\Program Files (x86)\nodejs\node_modu
les\npm\node_modules\npm-registry-client\lib\request.js:170:14)
npm verb stack at Request.self.callback (C:\Program Files (x86)\nodejs\node

modules\npm\node_modules\request\request.js:354:22)
npm verb stack at Request.emit (events.js:110:17)
npm verb stack at Request. (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\request\request.js:1207:14)
npm verb stack at Request.emit (events.js:129:20)
npm verb stack at IncomingMessage. (C:\Program Files (x86)\nodejs
\node_modules\npm\node_modules\request\request.js:1153:12)
npm verb stack at IncomingMessage.emit (events.js:129:20)
npm verb stack at _stream_readable.js:908:16
npm verb stack at process._tickCallback (node.js:355:11)
npm verb statusCode 404
npm verb pkgid node-serialport
npm verb cwd C:\Windows\system32
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "node-serialpor
t" "--verbose"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/node-se
rialport
npm ERR! 404
npm ERR! 404 'node-serialport' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm verb exit [ 1, true ]

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

C:\Windows\system32>

So did I ask for the right thing ??? - seems to not exist :-O. Did you mean me to just try serialport (and not node-serialport) ??.

NB tried to add the debug file but its blocked (not an image) :-O.

Thanks

BR
Graham

I think it should indeed be serialport, so give that a try.

I’ve been trying to get the CLI working on a freshly installed windows 8.1 VM. If I use the installer.exe it works just fine. Problems start to arise when using newer versions of node.js.
If you could give the full installer a try, rather than just the script, that’d be great. From the drop down you can select to install the CLI only, and not all the IDE stuff.

Beat you to it ;-)).

Thats what I suspected so I did indeed ‘give it a try’ and it worked perfectly.

So…

I then tried npm install -g particle-cli (in for a penny ;-)).

IT WORKED :-))))

You have one VERY happy bunny again :-).

I now have my CLI back and working again - EXCELLENT.

NB Not sure what did the trick - maybe someone fixed the Serialport build in the meantime ???. Cos I don’t see wht adding --verbose should fix anything :-O.

Whatever - after a very bad 2 days - I am back up and running.

All I can say is a GREAT thankyou to the whole team - you’ve restored my confidence again as well ;-)).

Great result…

Many thanks again
BR
Graham

Oops - as I had already done this when I read your post - I did it the old way. I wasn’t even aware that there was an ‘installer.exe’ :open_mouth: - where would I find it ???. Github I guess ???.

OK so I took a look at Github (please recall our previous discussion re github :wink:

I can find ‘spark/particl-cli’ and ‘mumblepins/Particle-CLI Installer’ as well as some other (assumed irrelevant from the titles) options.

I can’t see an installer.exe in either of these folders :-O.

See why I don’t like github ??? - it ‘assumes’ prior knowledge :open_mouth: - and leaves me wondering where I should go :-O.

If you point me at an installer I will willingly give it a go for you - but bear in mind that its now working anyway ;-)). Anything I can do to hep make this process smoother :wink:

BR
Graham
.

That’s seriously messed up, considering the entire content of the script you tried earlier is nothing more than that command :confused:

Well, disregarding that for the moment, I’m glad you’re up and running again.

Happy to help, that’s what makes this community as nice as it is :smile: Even though you might not see Particle being as active on the forums, it doesn’t mean they’re not on here. It just means the Elite are faster :sunglasses: All jokes aside, the Particle team is really awesome, and having had the pleasure of meeting them, I can assure you they’re working as hard as they possibly can to make the whole experience as smooth as possible. There’s just so much to do with a relatively small team, that their efforts are better spent on fixing the issues rather than treating the symptoms. That’s where we Elite help out, if we can. If we can’t, we’ll start bothering the folks over at Particle to take a look.

The installer I’m referring to is the one from Mumblepins. You mentioned that you’d used the extracted .zip file, rather than the .exe
You can find it over here: https://github.com/mumblepins/ParticleToolchainInstaller/releases
Finding that is rather easy through the community post, and has very little to do with github, other than it being hosted on there. Might I suggest you just spend a couple minutes browsing through github just to familiarize yourself a bit. It’s not as scary as it seems (for browsing that is). Some of the inner working might be a bit daunting, but even that is manageable if you’re willing.
At this point I’d recommend not to run the installer, considering you’ve got it working now. Wouldn’t want to mess that up. I’ll do a bit more troubleshooting on my VM later.

Sorry for the confusion, folks. Fixed the install command from my previous port :wink:

It’s just unfortunate the the pre-compiled binaries for windows does not cover majority of the OS variant.

Glad to hear you got it working though!

No problems here - I ‘guessed’ that it was possibly a typo - so when it failed to find it - tried the other one and it worked. Really have no idea why it worked after using --verbose but hey ho…

Thanks again guys
BR
Graham

I didn’t want to deal with any of the problems with installing cli on windows so I just ran a very basic vm and installed CLI and it worked very well.

A VM running what exactly?

I am running a custom version of a ubuntu mate vm but I tried to make it as small and as light weight as possible.