Yeoman installation is showing errors - node.js

I am unable to install yo from npm I have found these errors while running installation of yo, I have made all the paths for environment variables, but still getting error, i have also cleared the cache and re-install the nodejs , reboot my pc but still getting this error
$ npm install --global yo
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
C:\Users\hp\AppData\Roaming\npm\yo -> C:\Users\hp\AppData\Roaming\npm\node_modules\yo\lib\cli.js
C:\Users\hp\AppData\Roaming\npm\yo-complete -> C:\Users\hp\AppData\Roaming\npm\node_modules\yo\lib\completion\index.js
spawn-sync#1.0.15 postinstall C:\Users\hp\AppData\Roaming\npm\node_modules\yo\node_modules\spawn-sync
node postinstall
npm#1.0.0 C:\Users\hp\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 (node_modules\yo\node_modules\spawn-sync):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 postinstall: node postinstall
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status -4058
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "yo"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! file ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
npm ERR! path ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
npm ERR! spawn-sync#1.0.15 postinstall: node postinstall
npm ERR! spawn ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync#1.0.15 postinstall script 'node postinstall'.
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 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 information on how to open an issue for this project with:
npm ERR! npm bugs spawn-sync
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.
npm#1.0.0 C:\Users\hp\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 (node_modules\yo\node_modules\spawn-sync):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn-sync#1.0.15 postinstall: node postinstall
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status -4058
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "yo"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! Callback called more than once.
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\hp\npm-debug.log
npm ERR! code 1
Please tell me what is the problem with it.

Just install the latest version of nodejs and the error will get resolved.
Type the instructions in the terminal and node js will get updated:
$ sudo apt purge nodejs (for removing previous files of node js)
$ wget -qO- https://deb.nodesource.com/setup_7.x | sudo bash -(it will download latest version of node)
$ sudo apt-get install nodejs
and it is done.

Happened to me too... in recent distributions many packages install nodejs as the node.js executable, while spawn-sync attempts to call node, that is why this fails.
As a workaround, you can create a softlink from node to nodejs. Something like:
sudo ln -s `which nodejs` /usr/bin/node

Related

Issue with installing npm on Ubuntu 16.04

I am trying to install babel using the following command:
npm install --save-dev babel-cli
which is throwing the following output.
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.3
npm WARN react-essential#1.0.0 No repository field.
npm ERR! Linux 4.4.0-122-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save-dev" "babel-cli"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! path ../babel-cli/bin/babel-doctor.js
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../babel-cli/bin/babel-doctor.js' -> '/code/ReactExampleFiles/Ch02/02_01/start/node_modules/.bin/babel-doctor'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 4.4.0-122-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save-dev" "babel-cli"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! path npm-debug.log.1893237937
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.1893237937' -> 'npm-debug.log'
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! /code/ReactExampleFiles/Ch02/02_01/start/npm-debug.log
On some research - it was suggested to try npm install --no-bin-links, which is still erroring out:
vagrant#ubuntu-xenial:/code/ReactExampleFiles/Ch02/02_01/start$ npm install --no-bin-links
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.2.3
npm WARN react-essential#1.0.0 No repository field.
Please suggest how to fix.
Try update version of npm. npm install npm -g or apt update npm.

Node error Ubuntu

I got an error when trying to install appium. It always says: node error.
Here is code:
sudo npm install wd
wd#1.2.0 install /home/nataliya/node_modules/wd
node scripts/build-browser-scripts
sh: 1: node: not found
nataliya#1.0.0 /home/nataliya
├── json#9.0.6 extraneous
├── redis#0.7.3
├── selenium-webdriver#3.4.0
└── typescript#2.3.2
npm WARN nataliya#1.0.0 No description
npm WARN nataliya#1.0.0 No repository field.
npm ERR! Linux 4.4.0-77-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "wd"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! wd#1.2.0 install: `node scripts/build-browser-scripts`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the wd#1.2.0 install script 'node scripts/build-browser-scripts'.
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 wd package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build-browser-scripts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs wd
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls wd
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/nataliya/npm-debug.log
And when I try to instal Appium, it comes up with this error:
sudo npm install -g appium
/home/nataliya/npm/bin/appium -> /home/nataliya/npm/lib/node_modules /appium/build/lib/main.js
/home/nataliya/npm/lib
└── appium#1.6.4
npm WARN optional Skipping failed optional dependency /appium/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.1.1
I think you are victim of this issue: node is installed in a way that you only have nodejs in $PATH, but you need node.

Failed at chromedriver installation

I'm going to install slamdata on debian Jessie, as described here, but I failed at npm install section and it wanted to install chromedriver. I even tried a mirror of chromedriver. Here is logs.
exec#mob-db1:/opt/slamdata$ npm install
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
chromedriver#2.23.1 install /opt/slamdata/node_modules/chromedriver
node install.js
Downloading http://chromedriver.storage.googleapis.com/2.23/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Receiving...
ChromeDriver installation failed undefined
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.2.8-1-pve
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.23.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.23.1 install script node install.js.
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 chromedriver 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 information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/slamdata/npm-debug.log
exec#mob-db1:/opt/slamdata$ npm install chromedriver --chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver
npm WARN deprecated npmconf#2.1.2: this package has been reintegrated into
npm and is now out of date with respect to npm
chromedriver#2.23.1 install /opt/slamdata/node_modules/chromedriver
node install.js
Downloading http://npm.taobao.org/mirrors/chromedriver/2.23/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Receiving...
ChromeDriver installation failed undefined
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm ERR! Linux 4.2.8-1-pve
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "chromedriver" "--chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver"
npm ERR! node v6.4.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! chromedriver#2.23.1 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver#2.23.1 install script 'node install.js'.
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 chromedriver 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 information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/slamdata/npm-debug.log
I met it with 'yarn install' which info 'chromedriver: ChromeDriver installation failed Error with http'.So i try to install chromedriver before 'yarn install'.
And then solve it.
https://www.npmjs.com/package/chromedriver
If you are not able to install chrome driver through npm, use the binary files of chrome driver. Make sure you download the same version binary file as that of your chrome browser.
Go to: https://chromedriver.chromium.org/
This will give you an exe file.
Put this file in user/AppData/Roaming/npm directory.
set this to PATH environment variables.
Thats it! You are done :)

I'm having trouble with npm install for angular 2

This is error that I'm getting in cmd prompt:
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> angular2-quickstart#1.0.0 postinstall C:\Users\hp\Desktop\angular2-seed
> typings install
'typings' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.12
npm WARN angular2-quickstart#1.0.0 No description
npm WARN angular2-quickstart#1.0.0 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe"
"C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.7
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-quickstart#1.0.0 postinstall: `typings install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-quickstart#1.0.0 postinstall script 'typings install'.
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 angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\hp\Desktop\angular2-seed\npm-debug.log
When you see
'typings' is not recognized as an internal or external command, operable program > or batch file.
try to install typings first npm install typings --global
You need to install typings globally:
- npm i typings -g

Installing ionic on Linux ERR!s

I want to install Ionic on xUbuntu.
When I execute sudo npm install -g ionic, I get the following output but have no idea what the issue is.
npm WARN package.json eyes#0.1.8 No repository field.
npm WARN package.json faye-websocket#0.4.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json indexof#0.0.1 No repository field.
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
> node-sass#3.4.2 install /usr/local/lib/node_modules/ionic/node_modules/node-sass
> node scripts/install.js
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! node-sass#3.4.2 install: `node scripts/install.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the node-sass#3.4.2 install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.2.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/sisko
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/sisko/npm-debug.log
npm ERR! not ok code 0
sh: 1: node: not found
This seems to be the cause of the error.
You probably just need to install the legacy nodejs package:
sudo apt-get install nodejs-legacy
for more info see Cannot install packages using node package manager in Ubuntu
Another alternative is to use nvm https://github.com/creationix/nvm#installation , which lets you switch between different versions of node
nvm install node --reinstall-packages-from=node
nvm alias default node

Resources