bower install bootstrap issue - linux

I apologize as i am still in the process of learning how to use ubuntu.
First i installed npm, then i installed git.
then i tried to clone a repo from git.
Then i typed the following into terminal "bower install bootstrap".
I already had the source of bootstrap downloaded in a zip file.
I received the following error:-
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/bin/bower'
npm ERR! error rolling back bower#1.3.8 { [Error: EACCES, unlink '/usr/local/bin/bower'] errno: 3, code: 'EACCES', path: '/usr/local/bin/bower' }
npm ERR! Error: EACCES, unlink '/usr/local/bin/bower'
npm ERR! { [Error: EACCES, unlink '/usr/local/bin/bower'] errno: 3, code: 'EACCES', path: '/usr/local/bin/bower' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-32-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! cwd /home/haaggis
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/bin/bower
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/bin/bower'
npm ERR!
npm ERR! Additional logging details can be found in:
What am i doing wrong ?
Typing "npm install -g bower" into the terminal produces the above error.
And this stops me from entering "bower install bootstrap"

Please try running this command again as root/Administrator.
So, what happened when you tried sudo npm install -g bower ?

Related

npm does not work with sudo

I am trying to install csslint with npm:
npm install -g csslint
and I get this error:
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "node" "/usr/bin/npm" "install" "csslint"
npm ERR! node v0.12.7
npm ERR! npm v2.14.1
npm ERR! path ../csslint/cli.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, symlink '../csslint/cli.js'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, symlink '../csslint/cli.js'] errno: -13, code: 'EACCES', path: '../csslint/cli.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
and when I try with sudo Nothing happens and I do not get any message. (also when I just type sudo npm I see nothing happens.)

Cryptic error messages with npm and node

I'm following facebook's tutorial on getting started with React Native (https://facebook.github.io/react-native/docs/tutorial.html#hello-world), but I can't get the react-native-cli to install. Any help interpreting the error messages? Obviously it says to unlink something, but I don't know what it is linked to that it shouldn't be linked to.
Running as root seems to do something, but zsh still won't recognize the react-native command.
➜ ~ npm install -g react-native-cli
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "react-native-cli"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path /Users/bbarclay/.node/bin/react-native
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, unlink '/Users/bbarclay/.node/bin/react-native'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, unlink '/Users/bbarclay/.node/bin/react-native']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/bbarclay/.node/bin/react-native' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, unlink '/Users/bbarclay/.node /bin/react-native'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, unlink '/Users/bbarclay/.node/bin/react-native']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/Users/bbarclay/.node/bin/react-native' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/bbarclay/npm-debug.log
➜ ~ sudo npm install -g react-native-cli
Password:
/Users/bbarclay/.node/bin/react-native -> /Users/bbarclay/.node/lib/node_modules/react-native-cli/index.js
react-native-cli#0.1.4 /Users/bbarclay/.node/lib/node_modules/react-native-cli
└── prompt#0.2.14 (revalidator#0.1.8, pkginfo#0.3.0, read#1.0.6, winston#0.8.3, utile#0.2.1)
➜ ~ react-native init AwesomeProject
zsh: command not found: react-native
Add the admin permission to .npm home directory.
sudo chown -R $(whoami) ~/.npm

npm update -g makes my npm gone

I man on Mac OSX and want to perform a npm update to update all globally installed stuff.
After executing npm update -g, I got a lot of erros and npm is gone, like this:
localhost:~ myname$ npm
-bash: npm: command not found
I Googled but don't remember how I installed node. It seems it's not installed via brew, so that I can't use brew to un/reinstall node/npm.
-- UPDATE --
After checking the comments on some other links I decide to just reinstall node and my npm is back. But when I try to use npm install -g npm to update again, the issue returns. Here is the full stuff from my terminal:
localhost:~ myname$ npm install -g npm
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "npm"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/npm' }
npm ERR! Please include the following file with any support request:
npm ERR! /Users/myname/npm-debug.log
localhost:~ myname$ npm
-bash: /usr/local/bin/npm: No such file or directory
What should I do?
Thanks!
The error says literally: Please try running this command again as root/Administrator. It means you need to update/install with administrator privileges. To do so use "sudo":
sudo npm update -g

npm update error while trying to install ionic

I've got problems trying to install NPM.
Always worked well, but now, i've to install "ionic" and the problem is that when i tried to re-install nodejs all work well, it seems that npm installed but trying to update it, it gives me errors, so i tried to update it via this command:
curl https://www.npmjs.org/install.sh | sh
I cannot install ionic, i don't know why. I've installed months ago cordova and phonegap, but ionic gives me trouble.
Reading guides, tell me to update my npm and doing this, that what i've (this is the following error using the command above)
cleanup prefix=/usr/local
All clean!
unbuild npm#1.4.14
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.2.0
npm ERR! command "/usr/local/bin/node" "/private/var/folders/ry/gd7h2rhs52n10yr83_w50wyw0000gp/T/npm.18934/package/cli.js" "rm" "npm" "-gf"
npm ERR! cwd /private/var/folders/ry/gd7h2rhs52n10yr83_w50wyw0000gp/T/npm.18934/package
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.16
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/var/folders/ry/gd7h2rhs52n10yr83_w50wyw0000gp/T/npm.18934/package/npm-debug.log
npm ERR! not ok code 0
> npm#1.4.16 prepublish .
> node bin/npm-cli.js prune --prefix=. --no-global && rm -rf test/*/*/node_modules && make -j32 doc
make: Nothing to be done for `doc'.
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR! error rolling back npm#1.4.16 { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/npm' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/npm' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.2.0
npm ERR! command "/usr/local/bin/node" "/private/var/folders/ry/gd7h2rhs52n10yr83_w50wyw0000gp/T/npm.18934/package/cli.js" "install" "-gf"
npm ERR! cwd /private/var/folders/ry/gd7h2rhs52n10yr83_w50wyw0000gp/T/npm.18934/package
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.16
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/npm'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/var/folders/ry/gd7h2rhs52n10yr83_w50wyw0000gp/T/npm.18934/package/npm-debug.log
npm ERR! not ok code 0
Solved using the command sudo su on my mac os x (so without using sudo with the commando or sudo $username).
then using the curl commando it run.
Thanks however.
Might this answer could be usefull
Try this:
rm -rf /usr/local/lib/node_modules/npm
sudo curl https://www.npmjs.org/install.sh | sh

Error Installing ExpressJS via npm

I am running into an issue when I try to run "npm install -g express" and "npm install -g express-generator". Here is the error message for both. I have been able to install Express in the past by using package.json, but not through npm. Any ideas? :
"npm install -g express":
npm http GET https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/express
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/express'
npm ERR! error rolling back express#4.3.1 { [Error: EACCES, unlink '/usr/local/lib/node_modules/express']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/express' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/express'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/express']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/express' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /Users/user/Desktop/Projects/node
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /usr/local/lib/node_modules/express
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/express'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/user/Desktop/Projects/node/npm-debug.log
npm ERR! not ok code 0
"npm install -g express-generator":
npm http GET https://registry.npmjs.org/express-generator
npm http 200 https://registry.npmjs.org/express-generator
npm http GET https://registry.npmjs.org/express-generator/-/express-generator-4.2.0.tgz
npm http 200 https://registry.npmjs.org/express-generator/-/express-generator-4.2.0.tgz
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/express-generator'
npm ERR! error rolling back express-generator#4.2.0 { [Error: EACCES, unlink '/usr/local/lib/node_modules/express-generator']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/express-generator' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/express-generator'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/express-generator']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/express-generator' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express-generator"
npm ERR! cwd /Users/user/Desktop/Projects/node
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /usr/local/lib/node_modules/express-generator
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/express-generator'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/user/Desktop/Projects/node/npm-debug.log
npm ERR! not ok code 0
Did you try with sudo? It looks like the current user does not have access to /usr/local/lib.
By the way, you want to install express-generator globally for the project generator nowadays, not the express package globally anymore.
this is permission issue..
if you use without sudo, using this commandline..
sudo chown -R `whoami` ~/.npm
npm throws error without sudo
this link is best answer to you.
Run cmd as Administrator and try installing it again. It worked for me.
I had same problem.
I had command "npm cache clean" -> not work
ulimit -n 2560 -> not work
so I
delete .npm directory and run this command "npm search -g"
and removed some module -> in my case grunt*
that works for me.

Resources