Installing angularjs with NPM and NODEJS brings an error in ubuntu 16 04

0 votes

Using npm, I'm having trouble installing angularjs version 1.5.7. My package has been prepared. The following is a json file.

{

 "name": "angular",
 "version": "1.5.7"

}

When I run the following command in the terminal where my project is:

sudo npm install angular@1.5.7 --save

The following error notice appears:

npm ERR! Linux 4.4.0-24-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "angular@1.5.7" "--save"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ENOSELF

npm ERR! Refusing to install angular as a dependency of itself
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/nato/angular/npm-debug.log

This is my first time using npm to install angularjs, so I'm not sure what I'm doing wrong.

May 30 in Node-js by Neha
• 8,560 points
13 views

1 answer to this question.

0 votes
Rename your angular folder to angular-test or something else other than angular. Also, if you have a package.json file, make sure the package name isn't "angular."
answered May 30 by Vaani
• 7,020 points

Related Questions In Node-js

0 votes
0 answers

How can I completely uninstall nodejs, npm and node in Ubuntu

I installed it using: sudo apt-get install ...READ MORE

May 15 in Node-js by Kichu
• 19,040 points
188 views
0 votes
1 answer

Error:npm WARN unmet dependency in nodejs

Hii @kartik, Following are the possible solution : Manually ...READ MORE

answered Jul 12, 2020 in Node-js by Niroj
• 82,700 points
2,641 views
0 votes
0 answers

updating nodejs on ubuntu 16.04

When I used the node -v command ...READ MORE

2 days ago in Node-js by Vaani
• 7,020 points
7 views
0 votes
1 answer

How to write a test which expects an Error to be thrown in Jasmine?

Hello @kartik, Try using an anonymous function instead: expect( ...READ MORE

answered Jul 13, 2020 in Node-js by Niroj
• 82,700 points
2,680 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
968 views
0 votes
1 answer
0 votes
1 answer

sudo: npm: command not found

To answer your question, for me, the ...READ MORE

answered Feb 17 in Others by Aditya
• 7,280 points
450 views
0 votes
1 answer

Extending a middy middleware function in nodejs

Your pseudocode comes close to being correct. ...READ MORE

answered May 30 in Node-js by Vaani
• 7,020 points
25 views
0 votes
1 answer

Making POST request to discord server in nodejs

You'll need to solve the captchas; I ...READ MORE

answered May 30 in Node-js by Vaani
• 7,020 points
15 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP