Cannot find module 'vue-template-compiler/package.json'
See original GitHub issueVersion
3.0.0-rc.11
Node and OS info
node v10.8.0, npm 6.2.0, macOS High Sierra
Steps to reproduce
create empty project and try to serve it
vue create test -p default && cd test && vue serve src/main.js
What is expected?
serving empty project
What is actually happening?
Error: Cannot find module 'vue-template-compiler/package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at api.chainWebpack.webpackConfig (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/config/base.js:61:32)
at webpackChainFns.forEach.fn (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/Service.js:209:40)
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/Service.js:209:26)
at Service.resolveWebpackConfig (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/Service.js:213:48)
at PluginAPI.resolveWebpackConfig (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/PluginAPI.js:115:25)
npm run server
(which is linked to vue-cli-service serve
) works, but vue serve
should also work according to vue serve --help
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:10 (4 by maintainers)
Top Results From Across the Web
upgrade to vue3 Cannot find module 'vue-template-compiler ...
Error: Cannot find module 'vue-template-compiler/package.json' Require stack: - /myproject/node_modules/@vue/cli-service/lib/config/base.js - / ...
Read more >vue-template-compiler - npm
This package can be used to pre-compile Vue 2.0 templates into render functions to avoid runtime-compilation overhead and CSP restrictions.
Read more >Cannot find module '@vue/compiler-sfc/package.json'
When upgrading to vue 3 with : yarn add vue@next. I get this error: “Cannot find module '@vue/compiler-sfc/package.json”
Read more >Fatal Error: Cannot find module 'vue/package.json' - Issuehunt
npx vue-cli init ./wemake-vue-template my_test_app · Installed nvm · nvm install · nvm use · npm install · Copied and modified environment file...
Read more >Error: Cannot find module 'vue-template-compiler/package ...
Error: Cannot find module 'vue-template-compiler/package.json'
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I DONT SPEAK CHINESE FFS
Since rc.11 we make
vue-template-compiler
a peer dependency of@vue/cli-service
, so installing@vue/cli-service-global
won’t automatically installvue-template-compiler
.A temporary workaround is to manually run
npm i -g vue-template-compiler