When I try to install a npm package I receive the error:
MacBook-Pro-van-Jamie:gulp Egen$ npm install gulp-jshint –save-dev
npm ERR! addLocal Could not install /Users/Egen/Code/gulp/–save-dev
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "gulp-jshint" "–save-dev"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! The header content contains invalid characters
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
I've set the right permissions at /usr/local/lib/node_modules like this:
sudo chown -R Egen /usr/local/
What could be the problem?
The error is a result of an incorrect command. You typed:
npm install gulp-jshint -save-dev
This causes npm to try to install the packages gulp and -save-dev.
The correct command should be:
npm install gulp-jshint --save-dev
Related
I am trying to install script package on Atom but it gives the following error:
npm ERR! tar.unpack error reading /tmp/d-116420-6290-1xjcgjb/package.tgz
npm ERR! addLocal Could not install /tmp/d-116420-6290-1xjcgjb/package.tgz
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/nobodyu/.atom/.apm/.apmrc" "--userconfig" "/home/nobodyu/.atom/.apmrc" "install" "/tmp/d-116420-6290-1xjcgjb/package.tgz" "--target=0.36.8" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! 0-byte tarball
npm ERR! Please run `npm cache clean`
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! /tmp/apm-install-dir-116420-6290-1gbk138/npm-debug.log
I've also run
npm cache clean
And
sudo npm install -g npm#latest
But it is still giving me the same error
How can I successfully install this package?
https://github.com/atom/atom/issues/11798 check here if you are searching for Solution.
I'm trying to make an openshift MEAN stack application. I'm running npm install -g meanio
however it keeps throwing the following NPM errors:
npm ERR! addLocal Could not install /usr/local/lib/node_modules/meanio/lib/core_modules/server
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! No version provided in package.json
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! /usr/local/lib/node_modules/meanio/lib/core_modules/server/npm-debug.log
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "meanio"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! meanio#0.8.83 postinstall: `cd ./lib/core_modules/server && npm install && cd ../../..`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meanio#0.8.83 postinstall script 'cd ./lib/core_modules/server && npm install && cd ../../..'.
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 meanio package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd ./lib/core_modules/server && npm install && cd ../../..
npm ERR! You can get their info via:
npm ERR! npm owner ls meanio
npm ERR! There is likely additional logging output above.
Any help or questions are appreciated.
The preferred way to create MEAN app is via mean-cli
$ npm install -g mean-cli
$ mean init <myApp>
$ cd <myApp> && npm install
Make sure you have prerequisites installed.
http://learn.mean.io/
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
When i run a command with -g (global) installation i get EACCESS errors . I read on one of the stack overflow answers that i should use 'sudo chown -R whoami ~/.npm' to run as local/root adminstrator but it didnt help
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/.node/lib/node_modules/bower/.editorconfig'
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/Documents/tutorials/bookingappdemo
npm ERR! node -v v0.10.29
npm ERR! npm -v 2.0.0-alpha-5
npm ERR! path /Users/.node/lib/node_modules/bower/.editorconfig
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/Users/.node/lib/node_modules/bower/.editorconfig'
npm ERR! Additional logging details can be found in:
npm ERR! not ok code 0
If you are an administrator I suggest you run the command as root:
sudo npm install -g bower
I used --unsafe-perm with install e.g
sudo npm install -g learnyounode --unsafe-perm
this helped me install without permissions error, hope this is fixed soon.
I'm trying to install some npm modules and all goes fine until I try to install the dependencies of the installed modules. npm shows this log:
$ sudo npm install -g
npm ERR! addLocal Could not install .
npm ERR! Error: ENOENT, open 'package.json'
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 Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g"
npm ERR! cwd /Users/roemerbakker
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.21
npm ERR! path package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/roemerbakker/npm-debug.log
npm ERR! not ok code 0
$
Also tried the command without -g but it doesn't work either.
There is no need for this. When you install a npm package with npm install <package name> (globally or locally), it already installs all of its dependencies on its own.
You only need the npm install command when you checked out an Application with a package.json-File to install the APPLICATIONS Dependencies.
If you want to upgrade ALL global packages, you should use:
npm update -g