I'm currently in the process of migrating our Vue 2.6 mono-repo app to Vue 3 (currently on vue/compat mode 2). The plan is to migrate each sub-app independently from the other sub-apps. While migrating a single sub-app (the rest are on Vue 2.6), I am getting this error when trying to lint (vue-cli-service lint ./) or build storybook (vue-cli-service storybook:build -c ../.storybook) in our shared-v2 module repo.
ERROR Error: Cannot find module '@storybook/vue3/package.json'
Require stack:
- /project/path/node_modules/vue-cli-plugin-storybook/lib/index.js
- /project/path/node_modules/@vue/cli-service/lib/Service.js
- /project/path/node_modules/node_modules/@vue/cli-service/bin/vue-cli-service.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at module.exports (/project/path/node_modules/vue-cli-plugin-storybook/lib/index.js:20:37)
at /project/path/node_modules/@vue/cli-service/lib/Service.js:82:9
at Array.forEach (<anonymous>)
at loadedCallback (/project/path/node_modules/@vue/cli-service/lib/Service.js:80:20)
at Service.init (/project/path/node_modules/@vue/cli-service/lib/Service.js:97:14)
at Service.run (/project/path/node_modules/@vue/cli-service/lib/Service.js:247:16)
at Object.<anonymous> (/project/path/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: command finished with error: command (/project/path/shared-v2) yarn run storybook:build exited (1)
Describe the bug
I'm currently in the process of migrating our Vue 2.6 mono-repo app to Vue 3 (currently on
vue/compat
mode 2). The plan is to migrate each sub-app independently from the other sub-apps. While migrating a single sub-app (the rest are on Vue 2.6), I am getting this error when trying to lint (vue-cli-service lint ./
) or build storybook (vue-cli-service storybook:build -c ../.storybook
) in ourshared-v2
module repo.Environment
Additional context
.storybook/main.cjs
our mono-repo structure
shared-v2's
package.json