【发布时间】:2017-07-03 20:47:31
【问题描述】:
在 Windows 10 中运行注释“npm start”时出错。
包.json
Log
- 0 信息如果以 ok 结尾,则有效
- 1 详细的 cli ['C:\Program Files\nodejs\node.exe',
- 1 个详细的 cli 'C:\Users\vkarutha\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
- 1 详细的 cli 'start' ]i>
- 2 信息使用 npm@4.2.0
- 3 使用 node@v6.9.3 的信息
- 4 个详细的运行脚本 ['prestart', 'start', 'poststart']
- 5 信息生命周期 hello-world@0.1.0~prestart: hello-world@0.1.0
- 6 愚蠢的生命周期 hello-world@0.1.0~prestart:没有预启动脚本,继续
- 7 信息生命周期 hello-world@0.1.0~start: hello-world@0.1.0
- 8 详细生命周期 hello-world@0.1.0~start: unsafe-perm in lifecycle true
- 9 详细生命周期 hello-world@0.1.0~start: PATH: C:\Users\vkarutha\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\vkarutha\ Documents\React\hello-world\node_modules.bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32 \WindowsPowerShell\v1.0\;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files (x86)\Cisco\OSD-ShellApplications;C:\Program Files\Java\jdk1.8.0_101\ bin;C:\Cisco\software\apache-maven-3.3.9\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C: \Program Files\nodejs\bin;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Program Files (x86)\ssh 通信安全\ssh Secure Shell;C:\Users\vkarutha\AppData\Roaming\ npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\nodejs\bin
- 10 详细生命周期 hello-world@0.1.0~start: CWD: C:\Users\vkarutha\Documents\React\hello-world
- 11 愚蠢的生命周期 hello-world@0.1.0~start: Args: [ '/d /s /c', 'webpack-dev-server --hot' ]i>
- 12傻生命周期hello-world@0.1.0~start:返回:代码:4294967295信号:null
- 13 info生命周期hello-world@0.1.0~start:执行启动脚本失败
- 14 详细堆栈错误:hello-world@0.1.0 开始:
webpack-dev-server --hot - 14 详细堆栈退出状态 4294967295
- EventEmitter 的 14 个详细堆栈。 (C:\Users\vkarutha\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
- emitTwo (events.js:106:13) 的 14 个详细堆栈
- EventEmitter.emit (events.js:191:7) 中的 14 个详细堆栈
- ChildProcess 中的 14 个详细堆栈。 (C:\Users\vkarutha\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
- emitTwo (events.js:106:13) 的 14 个详细堆栈
- ChildProcess.emit (events.js:191:7) 的 14 个详细堆栈
- mayberClose 的 14 个详细堆栈 (internal/child_process.js:877:16)
- Process.ChildProcess._handle.onexit 的 14 个详细堆栈 (internal/child_process.js:226:5)
- 15 个详细的 pkgid hello-world@0.1.0
- 16 详细 cwd C:\Users\vkarutha\Documents\React\hello-world
- 17 错误 Windows_NT 10.0.10586
- 18 错误 argv "C:\Program Files\nodejs\node.exe" "C:\Users\vkarutha\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start"李>
- 19个错误节点v6.9.3
- 20 错误 npm v4.2.0
- 21 错误代码 ELIFECYCLE
- 22错误errno 4294967295
- 23 错误 hello-world@0.1.0 开始:
webpack-dev-server --hot - 23错误退出状态4294967295
- 24 错误在 hello-world@0.1.0 启动脚本“webpack-dev-server --hot”处失败。
- 24 错误请确保您已安装最新版本的 node.js 和 npm。
- 24 错误如果你这样做了,这很可能是 hello-world 包的问题,
- 24 错误与 npm 本身无关。
- 24 错误告诉作者这在你的系统上失败了:
- 24 错误 webpack-dev-server --hot
- 24 错误您可以通过以下方式获取有关如何为此项目打开问题的信息:
- 24 错误 npm 错误 hello-world
- 24 错误 或者如果这不可用,您可以通过以下方式获取他们的信息:
- 24 错误 npm owner ls hello-world
- 24 错误上面可能有额外的日志输出。
- 25 详细退出 [4294967295, true]
webpack.config.js
var config = {
entry: './main.js',
output: {
path:'./',
filename: 'index.js',
},
devServer: {
inline: true,
port: 8080
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'react']
}
}
]
}
}
【问题讨论】:
-
你确定你安装了
webpack-dev-server?