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
• 9,060 points
1,206 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,070 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
2,333 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,880 points
6,200 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,070 points
711 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
• 9,060 points
1,496 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,882 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,399 views
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,680 points
5,037 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,070 points
1,021 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,070 points
1,189 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