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
INFO Starting development server...
ERROR Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree.
Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree.
at Object. (/home/akhil/build-it-better-ui/node_modules/vue-loader/dist/compiler.js:14:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/akhil/build-it-better-ui/node_modules/vue-loader/dist/index.js:29:20)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/config/base.js:154:16
at /home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:268:40
at Array.forEach ()
at Service.resolveChainableWebpackConfig (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:268:26)
at Service.resolveWebpackConfig (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:272:48) at PluginAPI.resolveWebpackConfig (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/PluginAPI.js:132:25)
at serve (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/commands/serve.js:79:31)
at Service.run (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:262:12)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
I have met the same issue as yours, and it is because my Nodejs version is too low (node12) which does not support vue>=3.3.
This exception happens when vue-loader tries to require vue/compiler-sfc, and since the ?. syntax is not supported by node12, the "require" action will throw an Error. This exception description says like "requires vue (>=3.2.13) or @vue/compiler-sfc", but this reason is not correct actually.
Vue version
3.3.11
Link to minimal reproduction
Not applicable
Steps to reproduce
npm install -g @vue/cli
vue create
on prompts select defaults of vue3
cd project repo
npm run serve
What is expected?
web serve port should be opened. and output should be seen in UI
What is actually happening?
akhil@Akhil-S:~/build-it-better-ui$ npm run serve
INFO Starting development server...
ERROR Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree.
Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree.
at Object. (/home/akhil/build-it-better-ui/node_modules/vue-loader/dist/compiler.js:14:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/akhil/build-it-better-ui/node_modules/vue-loader/dist/index.js:29:20)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/config/base.js:154:16
at /home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:268:40
at Array.forEach ()
at Service.resolveChainableWebpackConfig (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:268:26)
at Service.resolveWebpackConfig (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:272:48) at PluginAPI.resolveWebpackConfig (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/PluginAPI.js:132:25)
at serve (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/commands/serve.js:79:31)
at Service.run (/home/akhil/build-it-better-ui/node_modules/@vue/cli-service/lib/Service.js:262:12)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
and output of this command
npm list vue @vue/compiler-sfc
[email protected] /home/akhil/build-it-better-ui
├─┬ @vue/[email protected]
│ └─┬ @vue/[email protected]
│ ├─┬ @vue/[email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├── @vue/[email protected]
└─┬ [email protected]
├── @vue/[email protected] deduped
└─┬ @vue/[email protected]
└── [email protected] deduped
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: