• 赚钱入口【需求资源】限时招募流量主、渠道主,站长合作;【合作模式】CPS长期分成,一次推广永久有收益。主动打款,不扣量;

新建工程vue-template-compiler/package.json missing module

Vue cps12345 9个月前 (07-15) 273次浏览 0个评论

1. Installed Node.js

2. npm install -g @vue/cli

3. vue create my-app

4. npm run serve

报错:

    ERROR Error: Cannot find module 'vue-template-compiler/package.json'
Error: Cannot find module 'vue-template-compiler/package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at api.chainWebpack.webpackConfig (D:\vueTest\test\node_modules\@vue\cli-service\lib\config\base.js:73:32)
at webpackChainFns.forEach.fn (D:\vueTest\test\node_modules\@vue\cli-service\lib\Service.js:225:40)
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (D:\vueTest\test\node_modules\@vue\cli-service\lib\Service.js:225:26)
at Service.resolveWebpackConfig (D:\vueTest\test\node_modules\@vue\cli-service\lib\Service.js:229:48)
at PluginAPI.resolveWebpackConfig (D:\vueTest\test\node_modules\@vue\cli-service\lib\PluginAPI.js:115:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@0.1.0 serve: vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Michal\AppData\Roaming\npm-cache_logs\2018-12-09T203013_264Z-debug.log`

解决方案

更新到下面版本即可修复

“ vue”:“ 2.5.22”“ vue-template-compiler”:“ 2.5.22

喜欢 (0)

您必须 登录 才能发表评论!