-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Failed index access on utils/tar.js while trying to publish a package with node_modules #7555
Closed
2 tasks done
Labels
Comments
NormanPerrin
added
Bug
thing that needs fixing
Needs Triage
needs review for next steps
labels
May 23, 2024
NormanPerrin
added a commit
to NormanPerrin/cli
that referenced
this issue
May 23, 2024
Can't reproduce with the steps given. cp -r node_modules package/node_modules What's in here? Where did it come from? |
Steps to reproduce with the # 1. Create directory that'll contain the content of the package to publish
mkdir package
# 2. Create any valid package.json
echo '{ "name": "@npm/example", "version": "0.0.1", "engines": { "node": "20.0.0" } }' > package.json
# 3. Can work with any content within the package/node_modules directory
# In example: touch node_modules/file
# but for a more realistic example a dependency can be installed:
npm install emoji-poop
# 4. Copy sufficient files to reproduce the issue to the package directory
cp -r package.json node_modules package
# 5. Compress the package directory
tar -zcvf npm-example-v1.tgz package
# 6. Try to publish, this will fail, showing the bug I tried to explain
npm publish --verbose npm-example-v1.tgz |
Ah ok I see what's going on here. The manual tarball creation includes the |
NormanPerrin
added a commit
to NormanPerrin/cli
that referenced
this issue
May 24, 2024
NormanPerrin
added a commit
to NormanPerrin/cli
that referenced
this issue
May 25, 2024
NormanPerrin
added a commit
to NormanPerrin/cli
that referenced
this issue
May 28, 2024
wraithgar
pushed a commit
that referenced
this issue
May 29, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Expected Behavior
For the package to be published
Steps To Reproduce
mkdir package
echo '{ "name": "@npm/example", "version": "0.0.1", "engines": { "node": "20.0.0" } }' > package/package.json
cp -r node_modules package/node_modules
tar -zcvf npm-example-v1.tgz package
npm publish --verbose npm-example-v1.tgz
Environment
The text was updated successfully, but these errors were encountered: