Error installing serialport on node.js - node.js

I am running windows 10 with node 4.2.2. I am trying to set up to work with my arduino but i keep running into issues installing serialport. Nothing I can find is helping. These are the errors I get when i run npm install serialport
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "serialport" "-g"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! serialport#2.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport#2.0.2 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:\Users\john\Desktop\node-ardx\node_modules\johnny-five\npm-debug.log

Make sure you have Python 2.7 installed. If you do, it may be an issue with the C++ compiler.
Install Microsoft Build Tools 2015 (https://www.microsoft.com/en-us/download/details.aspx?id=48159)
Then, on the cmd line change the default compiler to VS2015 :
$ npm config set msvs_version 2015
And to be extra sure :
$ set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
If you now try to install serialport you'll get a couple of yellow warnings but installs without any issue.
Cheers!

Related

Installing aws-sdk in node js returns npm error

I am trying to install the aws-sdk as per the instructions in getting started using AWS Polly service with node.js. I have tried to install it as instructed in windows 10, Visual Studio 2015 on a Windows 10 machine and in a Raspberry Pi running Raspbian. In all attempts the install fails. The command I used is 'npm install aws-sdk' on Windows and RPi.
Here is the output from the install on the Raspberry Pi and under Visual Studio:
Registry url: https://registry.npmjs.org/
Current Time: 8/6/2017 1:16:59 AM
Last Refreshed: 2/20/2016 1:36:30 PM
Number of Results: 257342
====Executing command 'npm install aws-sdk --save '====
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "aws-sdk" "--save"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! file C:\Users\barry\AppData\Roaming\npm-cache\isarray\1.0.0\package\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token '\u0000' at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: C:\Users\barry\AppData\Roaming\npm-cache\isarray\1.0.0\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\barry\Documents\Visual Studio 2015\Projects\AWS_Proxy\AWS_Proxy_app\npm-debug.log
What might I be doing wrong?
Have you tried using the -g flag?

ionic install npm error on window10

I installed nodejs,apache ant, JDK and android JDK.
after npm install -g cordova. so very good install!!
but... npm install -g ionic...
error code
C:\Users\dltls>npm install -g ionic
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\dltls\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\np
m-cli.js" "install" "-g" "ionic"
npm ERR! node v6.1.0
npm ERR! npm v3.9.0
npm ERR! shasum check failed for C:\Users\dltls\AppData\Local\Temp\npm-756-b0347231\registry.npmjs.org\ionic\-\ionic-1.7
.14.tgz
npm ERR! Expected: af493d5df4688d917d778b0934d1739b9be6efe6
npm ERR! Actual: fab0cac875d9881f84f09df86dd8229035deb772
npm ERR! From: https://registry.npmjs.org/ionic/-/ionic-1.7.14.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\dltls\npm-debug.log
I seach Internet... npm install -g npm and npm set registry https://registry.npmjs.org and npm cache clean but error exist.. help me!!

Trying to install yo with npm on Windows

I am on Windows and am trying to follow the instructions at http://yeoman.io/learning/index.html. So far I have successfully installed grunt-cli and bower but when I try to install yo using the following command...
npm install -g yo
...the command prompt returns this:
> spawn-sync#1.0.11 postinstall C:\Users\Aaron\AppData\Roaming\npm\node_modules\yo\node_modules\cross-spawn\node_modules\spawn-sync
> node postinstall
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! file ;C:\Windows\system32\cmd.exe
npm ERR! path ;C:\Windows\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn ;C:\Windows\system32\cmd.exe
npm ERR! spawn-sync#1.0.11 postinstall: `node postinstall`
npm ERR! spawn ;C:\Windows\system32\cmd.exe ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync#1.0.11 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Aaron\AppData\Roaming\npm\node_modules\npm-debug.log
Does anyone have any idea what the hell this means and how I can fix it?
You can try with this : https://github.com/npm/npm/issues/7781
I think this will helps you to solve your question.
And to get node & npm in cmd. You can set node location in windows environment variable. Then restart your cmd & try again to do this.
Try re-installing the setup with feature npm package manager and then get back to your npm install.

Installing cordova using cmd , <npm install -g cordova> gives error

I have installed node-js and set path to the bin folder, using Windows 7 .
using cmd , i am installing cordova, with following command.
npm install -g cordova
it gives the following error,
C:\Users\admin>npm install -g cordova
npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! shasum check failed for C:\Users\admin\AppData\Local\Temp\npm-27416-181
c77ac\registry.npmjs.org\cordova-app-hello-world\-\cordova-app-hello-world-3.9.0
.tgz
npm ERR! Expected: 5866d8fed5582686c68ec59a6d1097c4ec0fcc4b
npm ERR! Actual: 33c6d47bbc528da2c1b9b8e6ae592c2f5dba371f
npm ERR! From: https://registry.npmjs.org/cordova-app-hello-world/-/cordova-
app-hello-world-3.9.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\admin\npm-debug.log
How to get resolve the problem ?
You need to Run as Administrator. Right click CMD and choose Run as Administrator. For mac, using this command, sudo npm install -g cordova.
Try using npm I -g cordova --verbose. It will log all the things in console. Watch it for any specific error. Where its struck.

PhoneGap - get started in Visual Studio 2012

I have complete project in Visual Studio and I want it wrap to PhoneGap. I can't install PhoneGap, when I am writing to command line this: npm install -g phonegap, so I get this:
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodeJs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Users\Marek
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ENOGIT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Marek\npm-debug.log
npm ERR! not ok code0
I installed Git GUI in: C:\Users\Marek, but still doesn't work.
You have to install git the command line version to do this. The GUI version(I don't know which one that is) probably won't work. Get it from here: http://git-scm.com/
You should be able to type git and not get an error on the command line before you use npm

Resources