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
When attempting to install private NPM packages within a WebContainer environment, I'm consistently receiving 404 errors, despite the package being available and functioning correctly in conventional project setups outside the container.
Environment
Container type: WebContainer
NPM version: 10.2.3
Node.js version: 18.20.3
Package: @myprivatepackage/package-name
"@webcontainer/api": "^1.5.1-internal.9",
Steps to Reproduce
Set up a WebContainer environment
Configure .npmrc with appropriate authentication token
The private package should install successfully, just as it does in conventional environments outside the container.
Actual Behavior
Consistently receiving 404 errors when attempting to install the private package, suggesting that the authentication is not being properly recognized or applied within the WebContainer environment.
Error output:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@myprivatepackage/package-name
npm ERR! 404
npm ERR! 404 '@myprivatepackage/package-name@latest' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a tarball, folder, http url, or git repository.
Additional Context
The same authentication token works correctly in non-container environments
Other public packages install without issues in the WebContainer
I have verified that my token has the appropriate permissions to access the private package
Could there be specific limitations or security constraints within WebContainers that prevent proper authentication for private NPM packages? Any guidance on how to properly authenticate for private package installation in this environment would be greatly appreciated
Describe the bug
Description
When attempting to install private NPM packages within a WebContainer environment, I'm consistently receiving 404 errors, despite the package being available and functioning correctly in conventional project setups outside the container.
Environment
@myprivatepackage/package-name
Steps to Reproduce
.npmrc
with appropriate authentication tokennpm install @myprivatepackage/package-name
What I've Already Tried
I've exhausted multiple authentication approaches, all resulting in the same 404 error:
.npmrc
file with the authentication token:.npmrc
file in the user directory.npmrc
:Expected Behavior
The private package should install successfully, just as it does in conventional environments outside the container.
Actual Behavior
Consistently receiving 404 errors when attempting to install the private package, suggesting that the authentication is not being properly recognized or applied within the WebContainer environment.
Error output:
Additional Context
Could there be specific limitations or security constraints within WebContainers that prevent proper authentication for private NPM packages? Any guidance on how to properly authenticate for private package installation in this environment would be greatly appreciated
Link to the blitz that caused the error
https://webcontainers.io/
Steps to reproduce
npm install error
Expected behavior
Hope everything goes well with my npm install
Parity with Local
Screenshots
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: