name can only contain URL-friendly characters

isrj5 picture isrj5 · Jan 5, 2018 · Viewed 36.1k times · Source

I was trying to install package.json with npm init to install bootstrap in my folder but i am getting the error.

npm install [email protected] --save

I am new to this i can't exactly figure what i am doing wrong. I was following a tutorial whose link i'll attach along with screenshot of my console.

this the tutorial link

this is the screenshot

Answer

Fathima Linsa K picture Fathima Linsa K · Jan 5, 2018

npm init is actually creating the package.json file and setting the characteristics of the project(It has no relation with bootstrap). So, in the field package name, you have to enter the name of your project (you have now entered the npm install bootstrap command) or you can just press enter if the name displayed in bracket is enough. Complete the npm init processs by setting all characteristics of project.

As next step, you can do npm install [email protected] --save. It'll work