Skip to content

[BUG] ERR! Workspaces not supported for global packages (8.5.0+) #4477

@glen-84

Description

@glen-84

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

After updating to 8.5.0 (and 8.5.2), I'm seeing the following when running a script that uses concurrently:

$ npm run lint -w client

> lint
> concurrently "npm:lint:*"

[lint:*styles] npmnpm ERR! Workspaces not supported for global packages
[lint:*scripts]
[lint:*scripts] npm ERR! A complete log of this run can be found in:
[lint:*scripts] npm ERR!     C:\Users\Glen\AppData\Local\npm-cache\_logs\2022-02-27T11_41_42_106Z-debug-0.log
[lint:*styles]  ERR! Workspaces not supported for global packages
[lint:*styles]
[lint:*styles] npm ERR! A complete log of this run can be found in:
[lint:*styles] npm ERR!     C:\Users\Glen\AppData\Local\npm-cache\_logs\2022-02-27T11_41_42_108Z-debug-0.log
[lint:*styles]
[lint:*styles] > lint:styles
[lint:*styles] > stylelint "src/**/*.{scss,vue}"
[lint:*styles]
[lint:*scripts]
[lint:*scripts] > lint:scripts
[lint:*scripts] > eslint "src/**/*.{ts,vue}" "*.js"
[lint:*scripts]
[lint:*styles] npm run lint:styles exited with code 0
[lint:*scripts] npm run lint:scripts exited with code 0

Log:

28 verbose stack Error: Workspaces not supported for global packages
28 verbose stack     at Npm.exec (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:138:15)
28 verbose stack     at async module.exports (C:\Program Files\nodejs\node_modules\npm\lib\cli.js:66:5)
29 verbose cwd D:\Programming\Projects\x\v4\front-end\client
30 verbose Windows_NT 10.0.22000
31 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "prefix" "-g"
32 verbose node v16.14.0
33 verbose npm  v8.5.2
34 error Workspaces not supported for global packages
35 verbose exit 1

What is that "prefix" "-g" thing?

Expected Behavior

No errors.

Steps To Reproduce

  1. In Windows.
  2. Using workspaces.
  3. Run a script using concurrently.
  4. See error.

Environment

  • npm: 8.5.2
  • Node.js: 16.14.0
  • OS Name: Windows
  • System Model Name: Really?
  • npm config:
; "builtin" config from C:\Program Files\nodejs\node_modules\npm\npmrc

prefix = "C:\\Users\\Glen\\AppData\\Roaming\\npm"

; "user" config from C:\Users\Glen\.npmrc

//npm.pkg.github.com/:_authToken = (protected)

; "project" config from D:\Programming\Projects\x\v4\front-end\.npmrc

@x:registry = "https://gitlab.com/api/v4/packages/npm/"
//gitlab.com/api/v4/packages/npm/:_authToken = (protected)

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = D:\Programming\Projects\x\v4\front-end
; HOME = C:\Users\Glen
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 1high priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions