npm ERR! Error: Method Not Allowed, npm ERR! code E405

Wajeeh Ahsan
1 min readSep 23, 2020

--

I am having this issue while running an npm command:

666 error Error: Method Not Allowed
666 error at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
666 error at /usr/share/npm/lib/cache/add-named.js:203:12
666 error at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
666 error at FSReqWrap.oncomplete (fs.js:135:15)
667 error If you need help, you may report this *entire* log,
667 error including the npm and node versions, at:
667 error <http://github.com/npm/npm/issues>
668 error System Linux 4.14.62-v7+
669 error command "/usr/bin/node" "/usr/bin/npm" "install" "raspi-serial"
670 error cwd /var/www
671 error node -v v8.11.1
672 error npm -v 1.4.21
673 error code E405
674 verbose exit [ 1, true ]

I figured out that it was because npm install was pointing to a registry that was not there. You could update the registry in this way:

npm config set registry https://registry.npmjs.org

DONE.

--

--

Wajeeh Ahsan
Wajeeh Ahsan

No responses yet