为了账号安全,请及时绑定邮箱和手机立即绑定

跟着代码走到npm run build就报错

翻遍了问答好像没一样报错的,方法也都试了还是这个错误,求救,一直卡在这里


Hash: c568cc0db3c2dcefa794

Version: webpack 4.40.2

Time: 1209ms

Built at: 2019-09-19 23:32:26

 1 asset

Entrypoint main = bundle.js

[0] ./src/app.vue?vue&type=template&id=5ef48958& 269 bytes {0} [built] [failed]

[1 error]

[1] ./src/index.js + 3 modules 3.91 KiB {0} [built] [1 error]

    | ./src/index.js 181 bytes [built]

    | ./src/app.vue 1.03 KiB [built] [1 error]

    | ./src/app.vue?vue&type=script&lang=js& 79 bytes [built]

    |     + 1 hidden module

[6] (webpack)/buildin/global.js 472 bytes [built]

    + 4 hidden modules


WARNING in configuration

The 'mode' option has not been set, webpack will fallback to 'production' for th

is value. Set 'mode' option to 'development' or 'production' to enable defaults

for each environment.

You can also set it to 'none' to disable any default behavior. Learn more: https

://webpack.js.org/configuration/mode/


ERROR in ./src/app.vue

Module Error (from ./node_modules/vue-loader/lib/index.js):

vue-loader was used without the corresponding plugin. Make sure to include VueLo

aderPlugin in your webpack config.

 @ ./src/index.js 2:0-27 8:17-20


ERROR in ./src/app.vue?vue&type=template&id=5ef48958& 2:0

Module parse failed: Unexpected token (2:0)

File was processed with these loaders:

 * ./node_modules/vue-loader/lib/index.js

You may need an additional loader to handle the result of these loaders.

|

> <div id="test">

|       {{text}}

| </div>

 @ ./src/app.vue 1:0-82 10:2-8 11:2-17

 @ ./src/index.js

npm ERR! code ELIFECYCLE

npm ERR! errno 2

npm ERR! vuetodo@1.0.0 build: `webpack --config webpack.config.js`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the vuetodo@1.0.0 build script.

npm ERR! This is probably not a problem with npm. There is likely additional log

ging output above.


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-09-19T1

5_32_26_597Z-debug.log


正在回答

1 回答

绝了我现在遇到和你一模一样的问题,百度到的办法都尝试了一遍还是不行

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Vue+Webpack打造todo应用
  • 参与学习       84606    人
  • 解答问题       787    个

用前端最热门框架Vue+最火打包工具Webpack打造todo应用

进入课程

跟着代码走到npm run build就报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信