npm install angular error ubuntu - angularjs

Helloo, am starting to learn angular and while trying to install angular by npm install angular on ubuntu 16.04LTS am getting the following error:
npm ERR! Linux 4.4.0-64-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "angular"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! getaddrinfo EAI_AGAIN registry.npmjs.org:443
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! /home/hillux/npm-debug.log
some help will be appreciated guys.

Enter command in terminal
npm cache clean
chmod -R 777 directory where u installing npm
eg:(chmod -R 777 /root/mydesktop)
npm install

Related

Could not run npm install -g create-react-app

Could not run npm install -g create-react-app, it giving an error as below:
Any advise? Thanks
C:\Learning\ReactJS\basic-react>npm install -g create-react-app
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\node.exe" "C:\\node_modules\\npm\\bin\\npm-cli.js" "install"
"-g" "create-react-app"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND proxyaddress proxyaddress:80
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Please include the following file with any support request:
npm ERR! C:\Learning\ReactJS\basic-react\npm-debug.log
It appears you are behind a proxy and need to setup NPM to use the correct proxy settings. Maybe try this guide: https://jjasonclark.com/how-to-setup-node-behind-web-proxy/

npm install gives error: js2coffee#0.2.7 preinstall: `npm run-script ./cyclic.js`

I do have npm(3.6.0), node(v5.6.0) installed on ubuntu 14.04.
I am getting below error while I am running npm install :
npm ERR! Linux 3.13.0-77-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! js2coffee#0.2.7 preinstall: `npm run-script ./cyclic.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the js2coffee#0.2.7 preinstall script 'npm run-script ./cyclic.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 js2coffee package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run-script ./cyclic.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs js2coffee
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls js2coffee
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/sachin/angular_projects/demo/npm-debug.log
Anyone faced this issue?

Unable to install Angularjs on Windows 7

While installing angularjs on windows 7. It fails with the below message:
C:\angular.js>npm install
npm ERR! git rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7: fatal: bad o
bject ced17cbe52c1412b2ada53160432a5b681f37cd7
npm ERR! git rev-list -n1 ced17cbe52c1412b2ada53160432a5b681f37cd7:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true rev-list -n1 ced17cbe52c1412
b2ada53160432a5b681f37cd7
npm ERR! fatal: bad object ced17cbe52c1412b2ada53160432a5b681f37cd7
npm ERR!
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:\angular.js\npm-debug.log
What is the reason for fatal bad object?
If you are installing angular with NPM inside the console window in an IDE like webstorm for example, you can try installing it with your powershell for example, i think that should solve this error.
Resolved!
Issue was with devDependencies "grunt-jasmine-node" mentioned in angularjs package.json file.
Changed it from "grunt-jasmine-node": "git://github.com/vojtajina/grunt-jasmine-node.git#fix-grunt-exit-code" to "grunt-jasmine-node": "~2.0.1"
grunt-jasmine-node was the referring to the fatal object

Yeoman angularjs generator broken

I just create an empty directory called "assets" with my php lavarel project folder and issue the following command -> yo angular, then in the terminal, I was asked include sass/compass, bootstrap etc and start installing this generator. somehow, I got lots of errors that i have no ideas what that cause. I need some help and here are the errors.
npm npm ERR!http Error: ENOTEMPTY, rmdir 'xxx/app/assets/node_modules/grunt/lib'
GET https://registry.npmjs.org/optimist
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.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd xxx/app/assets
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path xxx/app/assets/node_modules/grunt/lib
npm ERR! code ENOTEMPTY
npm ERR! errno 53
npm ERR! Error: ENOENT, open 'xxx/app/assets/node_modules/grunt/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.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-karma" "karma-ng-html2js-preprocessor" "karma-ng-scenario" "--save-dev"
npm ERR! cwd xxx/app/assets
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path xxx/app/assets/node_modules/grunt/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! xxx/app/assets/npm-debug.log
npm ERR! not ok code 0
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! xxx/assets/npm-debug.log
npm ERR! not ok code 0
Looks like your user don't own your project folder. chown and chmod your folder so it work with the your user account.

Errors using Yeoman

I am trying to set up an AngularJS site using Yeoman:
$ yo angular
The installation is partly successful. The directory is being populated with all those files, but there are also several errors that left me wondering if the init was complete:
npm ERR! Error: EACCES, symlink '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer'
npm ERR! { [Error: EACCES, symlink '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-56-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/username/Development/LearnAngularJS
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path ../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/username/Development/LearnAngularJS/npm-debug.log
npm ERR! not ok code 0
npm ERR! Error: EACCES, symlink '../karma/bin/karma'
npm ERR! { [Error: EACCES, symlink '../karma/bin/karma'] errno: 3, code: 'EACCES', path: '../karma/bin/karma' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-56-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt-karma" "karma-ng-html2js-preprocessor" "karma-ng-scenario" "--save-dev"
npm ERR! cwd /home/username/Development/LearnAngularJS
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path ../karma/bin/karma
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../karma/bin/karma'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/username/Development/LearnAngularJS/npm-debug.log
npm ERR! not ok code 0
I am not sure why I'd need to run the init as root, that doesn't seem right. Where exactly is it looking (and failing) for those paths "../grunt-autoprefixer/node_modules", "../karma/bin/karma"? And, of course, what should I do to fix this behaviour?
Is this inside a VirtualBox or Vagrant shared folder? I got the same error and found it was because VirtualBox 4.18+ does not support symlinks inside shared folders:
https://www.virtualbox.org/ticket/10085

Resources