I am somewhat of a novice, so forgive me if I have done something stupid. I have a Windows 8 machine, I installed nodejs, and at the command prompt in Administrator mode I executed "npm install -g spark-cli".
This is what happened:
Make sure youâre using the Node.js command prompt in the Node.js folder in the start menu. Node.js apparently doesnât permanently modify your system path to be able to run packages from the normal command prompt, but when you run the Node.js command prompt, you should be able to run npm packages.
I guess it does permanently modify your path then. I think you must have to run that once to get the path set up, though. I seem to remember having this problem the first time I tried to run it with the normal command prompt and Iâve just been using the Node.js command prompt ever since.
Thanks to all of you for your advice. I have moved node.js to the start menu, and checked the PATH which does include a path name for nmp. To be honest, I am not sure what node.js is - am I supposed to be running the spark cli from this, i.e. opening nodejs and then typing âspark cloud loginâ? I tried that and I just get a ââŚâ prompt (for everything I then type!). So, I suspect that is NOT the thing to do!
Assuming that the Windows cmd.exe is where I should execute âspark cloud loginâ, I am still stuck. Can I modify the PATH so that the reference to âsparkâ is validâŚand to what??
Thanks, guys, I know I am a bit of a dummy when it comes to all this stuff.
You should see Node.js and Node.js command prompt both in the start menu. You can try running the one that says Node.js command prompt, but since npm is already in your path, that may not help.
It should have installed the files in C:\Users\<username>\AppData\Roaming\npm, so you can open that folder and see if you see spark.cmd. Youâll have to click on the View tab and check Hidden Items in Explorer first (AppData is a hidden folder). If spark.cmd is there, you should be able to run %appdata%\npm\spark cloud login from a cmd.exe window. If the files are not there, then it didnât install properly. You may want to try installing it again without running cmd.exe as administrator.
This is what I have in the c:\Users\User\AppData\Roaming\npm file (after un-hiding everything):
. Thatâs after re-executing ânpm install -g spark-cliâ as non-administrator (it wasnât there when I did it as Adminstrator, either).
Now, in the node-modules folder there is a spark-cli folder, but no spark.cmd there, only a spark.js file.
Interestingly, when I click on this the message comes up that it will not run on my computerâŚit is a 64 bit machine running Windows 8 and I have had this problem before.
I get an error message that relates to the problem at the very beginning of my initial query: the install failure of the serial port module. See below:
It doesnât seem to recognise âcloudâ either which may be related. I read the post âTroubles installing node-serialport during the spark-cli install on Windowsâ and installed Visual Studio 2013, and I removed Python altogether because I donât use it⌠Still no luck.
The message after the command line is saying that it cannot find a file in a folder v1.4.5 (the rest of the path doesnât much exist after npm either). I have looked throughout the folders in npm to do with serialport and I can only find references to v1.4.3 buried in a path under folders such as âwebgeekâ and ânode-v11-darwin-x64â. I just donât seem to have the right files⌠I really am at loss as to what to do and, frankly, why itâs necessary to have a PhD in Windows to install this: all I wanted to do was play with the Spark Core remotely! Hereâs a screen shot of the latestâŚ
Not sure if you followed the tutorial i shared during my previous post. I just did an update to the latest spark-cli using serialport v1.4.5 without any issues.
1.) I am on Windows 7 64bit running on Parallels. Windows 8 32 bit OR 64 bit should work the same.
2.) In the tutorial, i mentioned to use only 32bit packages or it might cause some issues.
3.) Same goes to OpenSSL version and 32bit compatability.
You might want to consider going through the tutorial again
Hi Kenneth,
Thanks - I went through the tutorial again (I removed everything and started again). All in 32 bit. You can see below the result when I called up node.js command prompt and ran the install - prob with the serialport load, again. Also, youâll see that it doesnât recognise âsparkâ when I enter the next command.
Any ideas gratefully received! Thanks, again.
Roger
I downloaded Express 2013 for Windows. I got rid of Python. Tried again:
I am afraid I donât understand all this stuff, or I might be able to suggest something, but I frankly havenât a clue what all these things do or whatâs actually going onâŚ
Hi Kenneth,
What you see is the end of the the command: npm install -g serialport --verbose. I looked through it and didnât see any errors, but I cannot see the whole output because it exceeds the screen buffer. Itâs pretty much all Greek to me.
Roger