Project cannot depend on workspace Package - Bolt

113 Views Asked by At

While using the Bolt Project Management tool (Like Lerna) I'm running into the following issues

error Project cannot depend on workspace Package "awesome-typescript-loader"
error Project cannot depend on workspace Package "bestzip"
error Project cannot depend on workspace Package "webpack"
error Project cannot depend on workspace Package "webpack-cli"
error Project cannot depend on workspace Package "awesome-typescript-loader"
error Project cannot depend on workspace Package "bestzip"
error Project cannot depend on workspace Package "webpack"
error Project cannot depend on workspace Package "webpack-cli"
error Project cannot depend on workspace Package "@types/uuid"
error Project cannot depend on workspace Package "awesome-typescript-loader"
error Project cannot depend on workspace Package "bestzip"
error Project cannot depend on workspace Package "webpack"

How can I fix this?

1

There are 1 best solutions below

0
On

Bolt is a relatively new kid in the block (Came out in 2017).

Verify if:

  1. You have added the bolt entry inside package.json at the top level.
"devDependencies": {
  "myDepdencies": "^0.95.0"
},
"bolt": {
  "workspaces": [
    "my_mono_repo_source/*"
 ]
}
  1. Verify that bolt workspaces entry is not using the multiglob:
// WRONG (Note the double asterisk **):
"bolt": {
  "workspaces": [
    "my_mono_repo_source/**"
 ]
// CORRECT (Note the single asterisk * ):
"bolt": {
  "workspaces": [
    "my_mono_repo_source/*",
    "my_mono_repo_source/deeply/nested/project_list/*",
 ]
  1. Verify that all the sub-project.json are using the same semver of the packages.

Then run in your directory bolt and this will call bolt install in your behalf.