Foxbaby213 2020-08-26 08:58 采纳率: 100%
浏览 976
已采纳

vue-cli3添加插件后运行componentNormalizer.js报错是啥原因?

用vuecli3创建了项目,添加了vue-loader依赖和element插件,然后开始写页面都一切正常,这两天想加一个flexible插件解决自适应问题,然后在插件菜单里面正常添加了vue-cli-plugin-pxtorem,结果再回到页面就开始报错


Failed to compile.

./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js
Module build failed: Error: ENOENT: no such file or directory, open 'F:\Work\vue\vue\node_modules\@vue\cli-service\node_modules\vue-loader\lib\runtime\componentNormalizer.js'


看了下大概意思是componentNormalizer.js这个什么js路径找不到了,就很迷惑,通过官方工具加了个插件怎么会导致文件丢失了呢,是bug吗还是我哪里操作漏了什么?

*控制台关键报错的输出内容如下

<s> [webpack.Progress] 95% emitting
<s> [webpack.Progress] 95% emitting HtmlWebpackPlugin
<s> [webpack.Progress] 95% emitting CopyPlugin
<s> [webpack.Progress] 98% after emitting
<s> [webpack.Progress] 98% after emitting CopyPlugin
<s> [webpack.Progress] 98% after emitting vue-cli-dashboard-plugin
<s> [webpack.Progress] 100% 

 WARN  
Couldn't parse bundle asset "F:\Work_zxz\vue\hzgh_vue\dist\js\chunk-vendors.js".
Analyzer will use module sizes from stats file.


 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'


  App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://192.168.1.152:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

*以及另外一段

<s> [webpack.Progress] 87% after chunk id optimization
<s> [webpack.Progress] 87% record modules
<s> [webpack.Progress] 87% record modules RecordIdsPlugin
<s> [webpack.Progress] 87% record chunks
<s> [webpack.Progress] 87% record chunks RecordIdsPlugin
<s> [webpack.Progress] 88% hashing
<s> [webpack.Progress] 88% after hashing
<s> [webpack.Progress] 88% after hashing HotModuleReplacementPlugin

 WARNING  Compiled with 83 warnings08:37:05


 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createBlock' (imported as '_createBlock') was not found in 'vue'

 warning  in ./src/components/BaiduMap.vue?vue&type=template&id=9f54c61e

"export 'createBlock' (imported as '_createBlock') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createTextVNode' (imported as '_createTextVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createTextVNode' (imported as '_createTextVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90


"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'


 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'createVNode' (imported as '_createVNode') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'openBlock' (imported as '_openBlock') was not found in 'vue'

 warning  in ./src/components/BaiduMap.vue?vue&type=template&id=9f54c61e

"export 'openBlock' (imported as '_openBlock') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'resolveComponent' (imported as '_resolveComponent') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'resolveComponent' (imported as '_resolveComponent') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'resolveComponent' (imported as '_resolveComponent') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'

 warning  in ./src/App.vue?vue&type=template&id=7ba5bd90

"export 'withCtx' (imported as '_withCtx') was not found in 'vue'


<s> [webpack.Progress] 89% record hash
<s> [webpack.Progress] 89% module assets processing
<s> [webpack.Progress] 90% chunk assets processing
<s> [webpack.Progress] 90% additional chunk assets processing
<s> [webpack.Progress] 90% additional chunk assets processing HotModuleReplacementPlugin

图片说明
图片说明

  • 写回答

4条回答 默认 最新

  • 菜鸟咸鱼一锅端 2020-08-26 09:21
    关注

    删除node_modelus重新安装npm install也不行?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵