405 Method Not Allowed by npm install
When I tried to execute:
npm install
I got a 405 error: 405 Method Not Allowed
. Checking it by click the URL behind:
http://registry.npmjs.org/whatwg-fetch/jquery
Hmm, it's obviously a broken URL. So we need to tell npm
which URL is correct, by adding it into .npmrc
. Normally, it's already there directly in your repository directory:
If it doesn't exist, just create one:
strict-ssl=false
registry=http://registry.npmjs.org
As for the correct registry url, since http://registry.npmjs.org/whatwg-fetch/jquery not working, I tried
http://registry.npmjs.org/jquery :
Volià! GET
it!
Now we can npm install
.