Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm ERR! 405 Method Not Allowed: express@latest

Of the several 405 related Questions posted here, none apply to my issue.

Here is the command I issued from Windows 7 on my Desktop PC:

npm install express

Here is the Error message:

npm ERR! code E405
npm ERR! 405 Method Not Allowed: express@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mr9832\AppData\Roaming\npm-cache\_logs\2018-02-21T20_36_09_581Z-debug.log

Here is the verbose Error Log mentioned above

C:\Users\mr9832\AppData\Roaming\npm-cache_logs\2018-02-21T20_36_09_581Z-debug.log

enter image description here

How can I fix it?

like image 478
M. Ryan Avatar asked Feb 21 '18 21:02

M. Ryan


Video Answer


2 Answers

This answer is probably a little bit too late, but I had the same problem. I fixed it by putting following settings in the npm config (located in %USERDATA%/.npmrc):

strict-ssl=false
registry=http://registry.npmjs.org

It requests the packages over plain http instead of the secure https.

like image 131
mahalde Avatar answered Oct 21 '22 05:10

mahalde


Use these commands:

npm config set proxy http://username:password@host:port
npm config set https-proxy http://username:password@host:port

Or you may edit the ~/.npmrc file:

proxy=http://username:password@host:port
https-proxy=http://username:password@host:port
https_proxy=http://username:password@host:port
like image 21
resatz Avatar answered Oct 21 '22 06:10

resatz