You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to install non-existent npm package such as this-pkg-does-not-exist-6820863782039188 causes Failed to fetch error, which cannot be distinguished from real network error.
This is because registry.npmjs.org does not return Access-Control-Allow-Origin: * for "HTTP 404 Not Found" responses.
npm ERR! Failed to fetch
npm ERR! A complete log of this run can be found in: /home/web/.npm/_logs/2023-09-28T05_07_54_094Z-debug-0.log
Expected (the same as npm CLI in local machine)
npm ERR! code E404
npm ERR! 404 Not Found - GET http://localhost:8745/this-pkg-does-not-exist-6820863782039188 - Not found
npm ERR! 404
npm ERR! 404 'this-pkg-does-not-exist-6820863782039188@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in: /home/web/.npm/_logs/2023-09-28T05_07_19_717Z-debug-0.log
The text was updated successfully, but these errors were encountered:
Trying to install non-existent npm package such as
this-pkg-does-not-exist-6820863782039188
causesFailed to fetch
error, which cannot be distinguished from real network error.This is because
registry.npmjs.org
does not returnAccess-Control-Allow-Origin: *
for "HTTP 404 Not Found" responses.See https://github.com/naruaway-sandbox/demo-npm-in-browser-not-found-cors for more details and reproduction steps.
I reported in npm/feedback#117 (comment) as well.
Actual
Expected (the same as npm CLI in local machine)
The text was updated successfully, but these errors were encountered: