You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxError: Unexpected token {
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 Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at requireConfig (C:\Users\Administrator\Desktop\webpack-in-action\examples\ simple\node_modules\webpack\bin\convert-argv.js:96:18)
at C:\Users\Administrator\Desktop\webpack-in-action\examples\simple\node_mod ules\webpack\bin\convert-argv.js:109:17
at Array.forEach (native)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\A ppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v4.4.4
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! simple@1.0.0 build: webpack -p
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the simple@1.0.0 build script 'webpack -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the simple package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs simple
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls simple
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Administrator\Desktop\webpack-in-action\examples\simple\np m-debug.log
你好,学了你的教程很受益。
但是有些疑惑,想请教一下你,
首先,在simple文件下下,首先我npm install 安装完依赖包后npm run dev后报错,无论是拿你的文件还是我自己练习写的文件,都报错,以下是报错信息:
C:\Users\Administrator\Desktop\webpack-in-action\examples\simple\webpack.config. js:1
(function (exports, require, module, __filename, __dirname) { const { resolve } = require('path')
^
SyntaxError: Unexpected token {
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 Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at requireConfig (C:\Users\Administrator\Desktop\webpack-in-action\examples\ simple\node_modules\webpack\bin\convert-argv.js:96:18)
at C:\Users\Administrator\Desktop\webpack-in-action\examples\simple\node_mod ules\webpack\bin\convert-argv.js:109:17
at Array.forEach (native)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\A ppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v4.4.4
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! simple@1.0.0 build:
webpack -p
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the simple@1.0.0 build script 'webpack -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the simple package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs simple
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls simple
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Administrator\Desktop\webpack-in-action\examples\simple\np m-debug.log
真的很想知道是什么问题,谢谢了,本人完全新手,若有打扰勿怪。
找到问题了,是因为node版本太低,无法识别es6语法,但是现在dev环境还是有点问题,我再研究研究
The text was updated successfully, but these errors were encountered: