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

webpack.config.js中devServer的host的IP地址是楼主本机的,npm install后 npm start 报错 #1

Open
fhefh2015 opened this issue Sep 7, 2016 · 0 comments

Comments

@fhefh2015
Copy link

npm install后 npm start 报错

在webpack.config.js中

devServer: {
        host: '127.0.0.1',//这里配置写的是楼主本机的无法运行
        historyApiFallback: true,
        hot: true,
        inline: true,
        progress: true, //打包进度反馈
    }
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@2.15.8
3 info using node@v4.4.7
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart @
6 info start @
7 verbose unsafe-perm in lifecycle true
8 info @ Failed to exec start script
9 verbose stack Error: @ start: `webpack-dev-server --hot --inline`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:827:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid @
11 verbose cwd /Users/fhefh/Documents/Dev/Git/v2ex_vue
12 error Darwin 15.5.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
14 error node v4.4.7
15 error npm  v2.15.8
16 error code ELIFECYCLE
17 error @ start: `webpack-dev-server --hot --inline`
17 error Exit status 1
18 error Failed at the @ start script 'webpack-dev-server --hot --inline'.
18 error This is most likely a problem with the  package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     webpack-dev-server --hot --inline
18 error You can get information on how to open an issue for this project with:
18 error     npm bugs
18 error Or if that isn't available, you can get their info via:
18 error
18 error     npm owner ls
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
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

1 participant