Trying to install yo with npm on Windows - node.js

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.

Related

npm run watch not working for laravel on windows

Here is the error i'm getting from cmd I tried look for a solution and not luck i didn't try it on OSX yet i might try that later
npm ERR! # watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 4294963238
npm ERR!
npm ERR! Failed at the # watch-poll script.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run watch -- --watch-poll
npm ERR! You can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch-poll"
npm ERR! cwd C:\Users\Yosef\Desktop\pos
npm ERR! node -v v6.11.2
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Yosef\Desktop\pos\npm-debug.log
npm ERR! not ok code 0
Sometimes, when you already started your webserver, the ELIFECYCLE error comes if you try to run the npm command again on another terminal session.
Make sure that you don't have any other instance running up.

Not able to run a vue app on node server

Im have started to learn vue js and trying to run this HackerNews clone
I have installed node js on windows 8 which is node v6.9.1 and npm v3.10.8.
There are two issues
1) when Im trying to run npm command it like npm -v it gives me output like this
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules
\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com
mand,
operable program or batch file.
3.10.8
2) when I tried npm run dev it gives following error
> vue-hackernews-2.0# dev G:\vue_demo\vue-hackernews-2.0-master
> node server
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! file C:\windows\system32\cmd.exe;F:\Software\apache-maven-3.3.9\bin
npm ERR! path C:\windows\system32\cmd.exe;F:\Software\apache-maven-3.3.9\bin
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\windows\system32\cmd.exe;F:\Software\apache-maven-3.3.
9\bin
npm ERR! vue-hackernews-2.0# dev: `node server`
npm ERR! spawn C:\windows\system32\cmd.exe;F:\Software\apache-maven-3.3.9\bin EN
OENT
npm ERR!
npm ERR! Failed at the vue-hackernews-2.0# dev script 'node server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-hackernews-2.0 pa
ckage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vue-hackernews-2.0
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vue-hackernews-2.0
npm ERR! There is likely additional logging output above.
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! vue-hackernews-2.0# dev: `node server`
npm ERR! Exit status -4058
npm ERR!
npm ERR! Failed at the vue-hackernews-2.0# dev script 'node server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-hackernews-2.0 pa
ckage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vue-hackernews-2.0
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vue-hackernews-2.0
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! G:\vue_demo\vue-hackernews-2.0-master\npm-debug.log
Here Im not able to understand what is use of maven :/
Please explain me this issues.

npm err code eisdir errno -4068 whenever installing any package

I followed this guide to install node to my machine without having admin rights.
I put node.exe, (npm.cmd and node_modules ) both from the npm zip in C:\Users\rakibler\Node. I added that to my path. I ran npm install -g bower and got
npm ERR! Error: EISDIR, open 'C:\Users\rakibler\Node\bower'
npm ERR! at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\rakibler\\Node\\\\node.exe" "C:\\Users\\rakibler\\Node\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "bower"
npm ERR! cwd C:\Users\rakibler
npm ERR! node -v v0.12.7
npm ERR! npm -v 1.4.9
npm ERR! path C:\Users\rakibler\Node\bower
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\rakibler\npm-debug.log
npm ERR! not ok code 0
at the end. It also seems like something else is wrong, because everything it downloads goes to C:\Users\rakibler\Node instead of C:\Users\rakibler\Node\node_modules. Not sure what's going wrong here. Any idea?
i think you need to install the npm globlally using
"npm install -g npm"
and then use it in directory to install bower . i hope this will solve your issue

Getting Error while creating project folder using command yo cg-angular

While creating project folder using the command yo cg-angular gets error showing below,
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"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! phantomjs#1.9.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs#1.9.16 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\MyNewAwesomeApp\npm-debug.log

Cannot install mean-cli via npm on Windows 7

Mean-cli is a package used to initialize meanio full stack javascript framework. But I cannot install it globally via npm. This is what I can provide you to understand what I mean.
C:\Windows\System32>npm install -g mean-cli
npm WARN engine mean-cli#0.9.14: wanted: {"node":"0.10.x","npm":"2.1.x"} (current:{"node":"0.10.34","npm":"1.4.28"})
> mean-cli#0.9.14 preinstall C:\Users\Rahul's\AppData\Roaming\npm\node_modules\mean-cli
> node ./scripts/preinstall
npm ERR! mean-cli#0.9.14 preinstall: `node ./scripts/preinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the mean-cli#0.9.14 preinstall script.
npm ERR! This is most likely a problem with the mean-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./scripts/preinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls mean-cli
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "mean-cli"
npm ERR! cwd C:\Windows\System32
npm ERR! node -v v0.10.34
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0
C:\Windows\System32>npm install -g npm
C:\Users\Rahul's\AppData\Roaming\npm\npm -> C:\Users\Rahul's\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm#2.1.14 C:\Users\Rahul's\AppData\Roaming\npm\node_modules\npm
C:\Windows\System32>npm -v
2.1.14
C:\Windows\System32>npm install -g mean-cli
> mean-cli#0.9.14 preinstall C:\Program Files\nodejs\node_modules\mean-cli
> node ./scripts/preinstall
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\\Users\\Rahul's\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "mean-cli"
npm ERR! node v0.10.34
npm ERR! npm v2.1.14
npm ERR! file cmd
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! mean-cli#0.9.14 preinstall: `node ./scripts/preinstall`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the mean-cli#0.9.14 preinstall script 'node ./scripts/preinstall'.
npm ERR! This is most likely a problem with the mean-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./scripts/preinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls mean-cli
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>node -v
v0.10.34
C:\Windows\System32>npm -v
2.1.14
I have referred a stack overflow question where it was discussed that the node should be updated. My nodejs is updated and I have updated npm as you guys can see. But then I get .scripts/preinstall.js error. Saw their github ticket where they say that this issue has been resolved but still i am facing it. Any help would be appreciated.
I just ran into the same issue.
Running the console as Administrator fixed the issue for me.

Resources