Failed to resolve loader: script-loader You may need to install it.
Posted 尔嵘
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to resolve loader: script-loader You may need to install it.相关的知识,希望对你有一定的参考价值。
这个问题说明你的vue项目中缺少script-loader依赖,安装一下:
//如果你一开始就是npm install
npm install -D script-loader
//如果你是用的cnpm install
cnpm install -D script-loader
安装之后,重新npm run serve 启动项目还是报错,如下:
These dependencies were not found:
* script-loader!file-saver in ./src/assets/js/Export2Excel.js, ./src/assets/js/excel/Export2Excel.js
* script-loader!xlsx/dist/xlsx.core.min in ./src/assets/js/Export2Excel.js, ./src/assets/js/excel/Export2Excel.js
To install them, you can run: npm install --save script-loader!file-saver script-loader!xlsx/dist/xlsx.core.min
Error from chokidar (D:\\): Error: EBUSY: resource busy or locked, lstat 'D:\\pagefile.sys'
这样说明还是缺少两个依赖,file-saver 和 xlsx,安装一下:
npm install -S file-saver npm install -S xlsx
//或者
cnpm install -S file-saver npm install -S xlsx
再次npm run serve 启动一下,成功
以上是关于Failed to resolve loader: script-loader You may need to install it.的主要内容,如果未能解决你的问题,请参考以下文章
Failed to resolve loader: script-loader You may need to install it.
Failed to resolve loader: script-loader You may need to install it.
15. Failed to resolve: junit:junit:4.12,Failed to resolve: javax.inject:javax.inject:1......