Spark-cli on Windows8.1 x64

Using this tutorial i’m not in any way able to install Spark-cli.
I have installed the following;

  • Node.js 0.12.0 (ia32) and npm
  • OpenSSL 1.0.1L Light (32-Bit)
  • Visual Studio Premium 2013 with Update 4
  • Visual C++ Redistributable (32bit)

And this is what the install gives me;

    C:\Windows\System32>npm install -g spark-cli
/
> serialport@1.4.5 install C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\spark-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

child_process: customFds option is deprecated, use stdio instead.
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 (C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:64:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.<anonymous>:99:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Jenniskens BJ\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--name=serialport" "--configuration=Release" "--module_name=serialport" "
=node" "--node_abi=node-v14" "--platform=win32" "--target_platform=win32" "--arch=ia32" "--target_arch=ia32" "--module_main=./serialport" "--host=https://node-serialport.s3.amazonaws.com/" "--module_path=C:\\Users\\Jenniskens BJ\\AppData
rt\\build\\serialport\\v1.4.5\\Release\\node-v14-win32-ia32" "--remote_path=./serialport/v1.4.5/Release/" "--package_name=node-v14-win32-ia32.tar.gz" "--staged_tarball=build\\stage\\serialport\\v1.4.5\\Release\\node-v14-win32-ia32.tar.gz
lport/v1.4.5/Release/" "--hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v1.4.5/Release/node-v14-win32-ia32.tar.gz"
gyp ERR! cwd C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\spark-cli\node_modules\serialport
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files (x86)\nodejs\node.exe rebuild --name=serialport --configuration=Release --module_name=serialport --version=1.4.5 --major=1 --minor=4 --patch=5 --runtime=node --node_abi=n
target_arch=ia32 --module_main=./serialport --host=https://node-serialport.s3.amazonaws.com/ --module_path=C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\spark-cli\node_modules\serialport\build\serialport\v1.4.5\Release\node-v14
e_name=node-v14-win32-ia32.tar.gz --staged_tarball=build\stage\serialport\v1.4.5\Release\node-v14-win32-ia32.tar.gz --hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.5/Release/ --hosted_tarball=https://node-serialpor
2.tar.gz' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\spark-cli\node_modules\serialport\node_modules\node-pre-gyp\lib\util\compile.js:76:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:1008:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
node-pre-gyp ERR! System Windows_NT 6.3.9600
node-pre-gyp ERR! command "node" "C:\\Users\\Jenniskens BJ\\AppData\\Roaming\\npm\\node_modules\\spark-cli\\node_modules\\serialport\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\spark-cli\node_modules\serialport
node-pre-gyp ERR! node -v v0.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.5.19
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files (x86)\nodejs\node.exe rebuild --name=serialport --configuration=Release --module_name=serialport --version=1.4.5 --major=1 --minor=4 --patch=5 --runtime=node --node_abi=node-v14 --platform=win32 --targ
./serialport --host=https://node-serialport.s3.amazonaws.com/ --module_path=C:\Users\Jenniskens BJ\AppData\Roaming\npm\node_modules\spark-cli\node_modules\serialport\build\serialport\v1.4.5\Release\node-v14-win32-ia32 --remote_path=./ser
gz --staged_tarball=build\stage\serialport\v1.4.5\Release\node-v14-win32-ia32.tar.gz --hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.5/Release/ --hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v
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" "spark-cli"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! serialport@1.4.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@1.4.5 install script 'node-pre-gyp install --fallback-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>

How to go further on this? What am i missing?

Can you try to install the Visual Studio mentioned here: https://github.com/voodootikigod/node-serialport#windows

This serialport package on Windows issue is getting annoying :stuck_out_tongue:

No luck with that :frowning:
But serialports seems to be installing OK. No luck with Spark-cli though

C:\Windows\System32>npm install serialport
/
> serialport@1.5.0 install C:\Windows\System32\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Windows\System32\node_modules\serialport\build\serialport\v1.5.0\Release\node-v14-win32-ia32\serialport.node" is installed via remote
serialport@1.5.0 node_modules\serialport
+-- bindings@1.2.1
+-- sf@0.1.7
+-- async@0.9.0
+-- nan@1.6.2
+-- debug@2.1.1 (ms@0.6.2)
+-- optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)

C:\Windows\System32>
1 Like

I don’t claim to know anything about npm, other than having had considerable troubles myself when trying to install it on Linux, but at the top of the error log that you posted it says that it couldn’t find the Python executable. Do you have that installed, and is it on the path?

Interesting and good find! Does the installation work with the Visual Studio I recommended or by the official repo?

My guess is that serialport package for spark-cli is tagged at 1.4.5 and the installation using npm install serialport is 1.5.0 and the update might have enabled better usability with Windows.

Are you keen to help us test this hypothesis out?

1.) Go to http://github.com/spark/spark-cli and download the entire repo

2.) Cd to the js folder and edit the package.json file.

3.) Look for the line with serialport and change 1.4.5 to *

4.) Save and run the command npm install

5.) Let us know how it goes!!

3 Likes

Hi @kennethlimcp… Thank you very much for the suggestion… changing the serialport version requirement to “*” in the package.json file resolved the install failure issue for me!

In my case, I have:

  • Windows 7 Professional x64
  • Visual Studio Express 2012 (x64)
  • Node.js v0.12.0 (x64)
  • Python 2.7.8 (x64 and 32b; configured npm to use the x64 version)
2 Likes

@nachtritter,

Thank you for letting me know! I wished it worked without Visual Studio and i think it should work as well.

This will give me more bullet to push for 1.5.0 :wink:

@nachtritter; Could you give a quick description on how to use a downloaded package and install from local source with npm on windows? I’m fiddling with it but not yet succeeded :wink:

@bartjenniskens,

if you describe the installation issue you are facing, i will be able to better help you resolve it :wink:

Well, normally I do a global install where npm downloads its sources on the fly. Now the question is how do I run an npm install from the sources I downloaded from github (spark-cli).

I have downloaded the repro from github and saw an folder called “js”, this contains the packages.json and I’ve edited it.

Now I must run the install, but what are the correct commands for it and does the “js” needs to be in an special location?

I’m not new to Linux nor windows but npm is just a complete new world for me :smile:

It’s the same so if you pull in thr latest repo with the patch merged, you go to js directory and do a npm install

This is a temporary workaround and you will need to cd to bin directory for now to use Spark-cli.

Command is node spark.js xxxxxx

Updates should be pushed by this week so global install with work!..but not for now… :wink:

Thats good news! … I’ll start working on it. I’ll let you know the outcome. Thanks!

1 Like

That worked! npm install was successful and node connected to the cloud. Thanks!

1 Like

Sweet! look out for the version bump and you will be able to remove and install it globally the next round.

Thanks for testing that it works :smile:

1 Like

Hi @bartjenniskens - I know you’ve already solved it, but FYI the npm help guided me to a solution:

C:\>npm install -help
npm install
npm install <pkg>
npm install <pkg>@<tag>
npm install <pkg>@<version>
npm install <pkg>@<version range>
npm install <folder>
npm install <tarball file>
npm install <tarball url>
npm install <git:// url>
npm install <github username>/<github project>

Can specify one or more: npm install ./foo.tgz bar@stable /some/folder
If no argument is supplied and ./npm-shrinkwrap.json is
present, installs dependencies specified in the shrinkwrap.
Otherwise, installs dependencies from ./package.json.

I used the npm install <folder> option, simply using the path to the /js folder of the extracted package and :tada: it was done. :stuck_out_tongue_winking_eye:

1 Like

FYI to all,

Spark-cli has been bumped to V1.0!!

The serialport version has been upped to V1.5.0 as well and should play nice with windows + other platforms :wink:

1 Like

Downloaded the new ZIP from Git Hub and this installed flawlessly;

serialport@1.5.0 node_modules\serialport
├── bindings@1.2.1
├── sf@0.1.7
├── async@0.9.0
├── nan@1.6.2
├── debug@2.1.2 (ms@0.7.0)
└── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)

npm was not yet on the same version like you said.

You can can now use the official npm install -g spark-cli to pull in V1.0.0 for global installation and usage :smile:

@kennethlimcp; Works for me!
npm install -g spark-cli --> [serialport] Success

Thanks!

1 Like

@kennethlimcp, on my Win7x64 setup, I had to install the latest nodejs (14) to install v1.0.0 of Spark CLI :smile:

1 Like