You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Describe the Bug
When running the build command, I am getting this log from turbo: WARNING Issues occurred when constructing package graph. Turbo will function, but some features may not be available: 1 error occurred: * json: cannot unmarshal object into Go struct field NpmPackage.packages.workspaces of type []string
That's probably because my workspaces entry is not made of []string but it's formed like that instead: "workspaces": { "packages": [ "packages/**" ] }
Expected Behavior
Turbo properly parses packages entry.
To Reproduce
Setup a monorepo project using the same "workspaces" entry structure given in the Bug description.
Hey @HerryYT! Thanks for the report. I took a quick look through how NPM parses workspaces - interestingly, it does look like they allow an Array of strings at either workspaces.packages, orworkspaces (source).
Currently we only support: workspaces: Array<string> and not workspaces: { packages: Array<string> }.
We'll get that fixed up, but to get unblocked in the meantime you can swap your package.json workspace declaration to use the more common (and functionally equivalent): workspaces: Array<string>.
We were unable to parse an npm lockfile that used the alternate format
for workspaces (`"workspaces": { "packages": [ "packages/**" ]}`)
Error manifested as:
```
WARNING Issues occurred when constructing package graph. Turbo will function, but some features may not be available: 1 error occurred:
* json: cannot unmarshal object into Go struct field NpmPackage.packages.workspaces of type []string
```
Fixes#3207 and
#3050
What version of Turborepo are you using?
1.6.3
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Describe the Bug
When running the build command, I am getting this log from turbo:
WARNING Issues occurred when constructing package graph. Turbo will function, but some features may not be available: 1 error occurred: * json: cannot unmarshal object into Go struct field NpmPackage.packages.workspaces of type []string
That's probably because my workspaces entry is not made of []string but it's formed like that instead:
"workspaces": { "packages": [ "packages/**" ] }
Expected Behavior
Turbo properly parses packages entry.
To Reproduce
Setup a monorepo project using the same "workspaces" entry structure given in the Bug description.
Reproduction Repo
https://github.com/JSPrismarine/JSPrismarine
The text was updated successfully, but these errors were encountered: