npm run dev 报错!SyntaxError: Use of const in strict mode.

简介: D:initUser20190315renren-fast-vue-masternode_moduleswebpack-dev-serveebpack-dev-server.js:8const fs = require('fs');^^^^^SyntaxError: Use of const in strict mode.

D:initUser20190315renren-fast-vue-masternode_moduleswebpack-dev-serve
ebpack-dev-server.js:8
const fs = require('fs');
^^^^^
SyntaxError: Use of const in strict mode.

at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! renren-fast-vue@1.2.2 dev: `webpack-dev-server --inline --progre
nfig build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the renren-fast-vue@1.2.2 dev script 'webpack-dev-serv

原因:node.js版本过低,升级到项目支持的版本。

相关文章
|
18天前
|
JavaScript
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
|
2月前
|
缓存 JavaScript 测试技术
软件测试/测试开发|npm常见报错解析
软件测试/测试开发|npm常见报错解析
45 0
|
2月前
|
JSON JavaScript Unix
Nodejs 第五章(Npm run 原理)
Nodejs 第五章(Npm run 原理)
14 0
|
2月前
|
Python
NPM【问题 01】npm i node-sass@4.14.1报错not found: python2及Cannot download问题处理
NPM【问题 01】npm i node-sass@4.14.1报错not found: python2及Cannot download问题处理
42 0
|
2月前
|
JavaScript
npm run build ERROR in static_js_vendor.e475838be75c71f87b37.js from UglifyJs
npm run build ERROR in static_js_vendor.e475838be75c71f87b37.js from UglifyJs
|
2月前
|
前端开发 JavaScript
Vue中引入swiper插件报错:To install it, you can run: npm install --save swiper/css/swiper.css
Vue中引入swiper插件报错:To install it, you can run: npm install --save swiper/css/swiper.css
|
2月前
|
JavaScript
【Vue】npm run serve 和 npm run dev 有什么区别
【Vue】npm run serve 和 npm run dev 有什么区别
|
2月前
|
JavaScript
Vue报错:npm run start npm ERR! missing script: start
Vue报错:npm run start npm ERR! missing script: start
|
3月前
cnpm i安装报错-Install fail! Error: Unsupported URL Type: npm:vue-loader@^15.9.7
cnpm i安装报错-Install fail! Error: Unsupported URL Type: npm:vue-loader@^15.9.7
73 1

相关产品

  • 云迁移中心
  • 推荐镜像

    更多