My project has a .gitignore (content doesn't matter), an empty.npmignore, and does not have a files field in package.json. When I run npm pack --dry-run, it does not publish all the files in the project.
Expected Behavior
It should file all the files, I am not ignoring any.
Steps To Reproduce
It seems to have to do with being nested in another project (workspaces).
git clone --single-branch --depth=1 git@github.com:lume/lume.git lume
cd lume
git checkout beed124b5958bc59ba43212b2cf0dbbe294b4034
git submodule update --init packages/cli
cd packages/cli
npm pack --dry-run
❯ npm config ls
npm WARN ignoring workspace config at /Users/trusktr/src/lume+lume/packages/cli/.npmrc
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.
npm ERR! A complete log of this run can be found in: /Users/trusktr/.npm/_logs/2024-04-26T22_18_15_165Z-debug-0.log
```ini
❯ npm config ls --no-workspaces
; "builtin" config from /Users/trusktr/.npm-packages/lib/node_modules/npm/npmrc
; prefix = "/opt/homebrew" ; overridden by user
; "user" config from /Users/trusktr/.npmrc
//registry.npmjs.org/:_authToken = (protected)
prefix = "/Users/trusktr/.npm-packages"
; "project" config from /Users/trusktr/src/lume+lume/packages/cli/.npmrc
package-lock = false
; "cli" config from command line options
workspaces = false
; node bin location = /Users/trusktr/.n-node-versions/bin/node
; node version = v20.6.1
; npm local prefix = /Users/trusktr/src/lume+lume/packages/cli
; npm version = 10.5.2
; cwd = /Users/trusktr/src/lume+lume/packages/cli
; HOME = /Users/trusktr
; Run `npm config ls -l` to show all defaults.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
My project has a
.gitignore
(content doesn't matter), an empty.npmignore
, and does not have afiles
field inpackage.json
. When I runnpm pack --dry-run
, it does not publish all the files in the project.Expected Behavior
It should file all the files, I am not ignoring any.
Steps To Reproduce
It seems to have to do with being nested in another project (workspaces).
Unexpected output of npm pack:
If you clone the cli repo directly, no problem (make sure you back out of the
lume
folder):Expected output of npm pack:
Environment
npm ERR! A complete log of this run can be found in: /Users/trusktr/.npm/_logs/2024-04-26T22_18_15_165Z-debug-0.log