npm run build报错

来源:2-1 vue-loader+webpack项目配置

qq_90后大叔_0

2018-03-14 11:11

> vue@1.0.0 build D:\vue

> webpack --config webpack.config.js


D:\vue\node_modules\webpack\bin\webpack.js:3

let webpackCliInstalled = false;

^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

    at exports.runInThisContext (vm.js:53:16)

    at Module._compile (module.js:373:25)

    at Object.Module._extensions..js (module.js:416:10)

    at Module.load (module.js:343:32)

    at Function.Module._load (module.js:300:12)

    at Function.Module.runMain (module.js:441:10)

    at startup (node.js:139:18)

    at node.js:968:3


npm ERR! Windows_NT 10.0.14393

npm ERR! argv "F:\\Program Files\\nodejs\\node.exe" "F:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"

npm ERR! node v4.4.3

npm ERR! npm  v2.15.1

npm ERR! code ELIFECYCLE

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

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the vue@1.0.0 build script 'webpack --config webpack.config.js'.

npm ERR! This is most likely a problem with the vue package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     webpack --config webpack.config.js

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs vue

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!

npm ERR!     npm owner ls vue

npm ERR! There is likely additional logging output above.


npm ERR! Please include the following file with any support request:

npm ERR!     D:\vue\npm-debug.log


写回答 关注

1回答

  • Ryan幕
    2018-03-20 17:07:36

    你用的这是1.0版本的vue吗


Vue+Webpack打造todo应用

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

84606 学习 · 787 问题

查看课程

相似问题