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, 2022 in Node-js by Neha
• 8,940 points
337 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, 2022 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, 2022 in Node-js by Kichu
• 19,050 points
1,610 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,840 points
3,891 views
0 votes
0 answers

updating nodejs on ubuntu 16.04

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

Jun 27, 2022 in Node-js by Vaani
• 7,020 points
117 views
0 votes
0 answers

npm command not working after installing nodejs in windows10?

i have installed nodejs from nodejs website. ...READ MORE

Aug 11, 2022 in Node-js by Neha
• 8,940 points
461 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
1,205 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, 2022 in Others by Aditya
• 7,660 points
3,091 views
0 votes
1 answer

Extending a middy middleware function in nodejs

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

answered May 30, 2022 in Node-js by Vaani
• 7,020 points
441 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, 2022 in Node-js by Vaani
• 7,020 points
353 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP