Skip to content
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] npm install silently fails to create symlinks for workspaces when "main" is added in parent package.json #4080

Open
2 tasks done
vorillaz opened this issue Nov 22, 2021 · 1 comment
Labels
Bug thing that needs fixing Release 8.x work is associated with a specific npm 8 release

Comments

@vorillaz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

When I am trying to bootstrap a project with workspaces and main is present the installation fails to symlink the workspaces.

Expected Behavior

Symlinking the workspaces or showing a warning message.

Steps To Reproduce

  1. Create a project with npm init -y, main should be present inside the parent package.json
  2. Add one or more workspaces
  3. Run npm install
  4. Workspaces are not properly symlinked, no error or warning is thrown.

Example structure:

+-- package.json
`-- workspace-a
   `-- package.json

Example parent package.json :

{
  "name": "my-workspaces-powered-project",
  "main": "index.js",
  "workspaces": [
    "workspace-a"
  ],
  "devDependencies": {
    "typescript": "4.3.5",
    "@types/node": "16.7.5",
  }
}

Environment

  • npm: 8.0.0
  • Node: v16.11.1
  • OS: MacOS
  • npm config:
; "builtin" config from /opt/homebrew/lib/node_modules/npm/npmrc

prefix = "/opt/homebrew"

; node bin location = /opt/homebrew/Cellar/node/16.11.1/bin/node
; cwd = /Users/vorillaz
; HOME = /Users/vorillaz
; Run `npm config ls -l` to show all defaults.
@vorillaz vorillaz added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Nov 22, 2021
@ruyadorno
Copy link
Contributor

@vorillaz can you try replicating this problem on the latest version of npm? currently npm@8.3.2

@ruyadorno ruyadorno removed the Needs Triage needs review for next steps label Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests

2 participants