Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm init @repo -w package/foo will fail due to the following error.
npm error code E404
npm error 404 Not Found - GET https://<redacted>/api/npm/npm-<redacted>//@repo%2fcreate
npm error 404
npm error 404 '@repo/create@0.0.1' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
The @repo/create package is a local package and installed as a dependency on the workspace root.
Expected Behavior
npm init @repo -w package/foo succeeds as mkdir package/foo; cd package/foo; npx @repo/create does.
Steps To Reproduce
- Create new npm project.
- Create workspace package
@repo/create in packages/create
- Install it in the root package
- npm init @repo -w package/foo
Environment
- npm: 10.8.2
- Node.js: v22.5.1
- OS Name: Darwin
- System Model Name:
- npm config:
; "builtin" config from /opt/homebrew/lib/node_modules/npm/npmrc
prefix = "/opt/homebrew"
; "project" config from /Users/apratti/workspace/repo/.npmrc
email = (protected)
; node bin location = /opt/homebrew/Cellar/node/22.5.1/bin/node
; node version = v22.5.1
; npm local prefix = /Users/apratti/workspace/repo
; npm version = 10.8.2
; cwd = /Users/apratti/workspace/repo
; HOME = /Users/apratti
; 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
npm init @repo -w package/foowill fail due to the following error.The
@repo/createpackage is a local package and installed as a dependency on the workspace root.Expected Behavior
npm init @repo -w package/foosucceeds asmkdir package/foo; cd package/foo; npx @repo/createdoes.Steps To Reproduce
@repo/createin packages/createEnvironment