Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教 #3

Open
kx59717 opened this issue Feb 15, 2017 · 1 comment
Open

请教 #3

kx59717 opened this issue Feb 15, 2017 · 1 comment

Comments

@kx59717
Copy link

kx59717 commented Feb 15, 2017

你好,学了你的教程很受益。
但是有些疑惑,想请教一下你,
首先,在simple文件下下,首先我npm install 安装完依赖包后npm run dev后报错,无论是拿你的文件还是我自己练习写的文件,都报错,以下是报错信息:

simple@1.0.0 build C:\Users\Administrator\Desktop\webpack-in-action\examples\s imple
webpack -p

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环境还是有点问题,我再研究研究

@jiangfengming
Copy link
Owner

jiangfengming commented Feb 16, 2017

那我把这个issue关了, 有问题可以开新的issue :)

还是把issue开着让后人可以方便的找到相同问题吧~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants