Skip to content

[Error] cannot find vue/compiler-sfc when using yarn workspace and lerna to install node_modules.  #2031

Closed
@radiorz

Description

@radiorz

depend:

"@vue/compiler-sfc": "^3.2.47",
"vue-loader": "^17.0.1",
 "webpack": "^5.76.1",

Try:

  • user lerna bootstrap to install node_modules,
  • and try to run
yarn workspace vue3 build

and came out error
image

fix:

just copy the vue/compiler-sfc in child project's node_modules to the root's node_modules and it works fine.

demo :

https://github.com/radiorz/webpack-demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions