3d-Three进行npm start出错

3d-Three进行npm start
失败报错,

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'D:\\nodejs\\node.exe',
1 verbose cli   'D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev'
1 verbose cli ]
2 info using npm@6.14.7
3 info using node@v14.7.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle three@0.102.0~predev: three@0.102.0
6 info lifecycle three@0.102.0~dev: three@0.102.0
7 verbose lifecycle three@0.102.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle three@0.102.0~dev: PATH: D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\nodejs\html\threejs\node_modules\.bin;D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\nodejs\html\threejs\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Git\cmd;C:\ProgramData\ComposerSetup\bin;D:\nodejs\;D:\Go\bin;C:\Users\audi\AppData\Local\Microsoft\WindowsApps;D:\phpstudy\PHPTutorial\php\php-5.6.27-nts;C:\Users\audi\AppData\Roaming\Composer\vendor\bin;D:\redis;C:\Users\audi\AppData\Roaming\npm;C:\Users\audi\go\bin;
9 verbose lifecycle three@0.102.0~dev: CWD: D:\nodejs\html\threejs
10 silly lifecycle three@0.102.0~dev: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'concurrently --names "ROLLUP,HTTP" -c "bgBlue.bold,bgGreen.bold" "rollup -c -w -m inline" "http-server -c -p 8080"'
10 silly lifecycle ]
11 silly lifecycle three@0.102.0~dev: Returned: code: 1  signal: null
12 info lifecycle three@0.102.0~dev: Failed to exec dev script
13 verbose stack Error: three@0.102.0 dev: `concurrently --names "ROLLUP,HTTP" -c "bgBlue.bold,bgGreen.bold" "rollup -c -w -m inline" "http-server -c -p 8080"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (D:\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1051:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid three@0.102.0
15 verbose cwd D:\nodejs\html\threejs
16 verbose Windows_NT 10.0.18363
17 verbose argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v14.7.0
19 verbose npm  v6.14.7
20 error code ELIFECYCLE
21 error errno 1
22 error three@0.102.0 dev: `concurrently --names "ROLLUP,HTTP" -c "bgBlue.bold,bgGreen.bold" "rollup -c -w -m inline" "http-server -c -p 8080"`
22 error Exit status 1
23 error Failed at the three@0.102.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

需要安装webpack,
如果之前npm install有警告,
先执行npm install -g npm-install-peers。
全局安装webpack,执行npm i webpack@3.8.1 -g,最新版本4.x.x有兼容问题,3.8.1版本是稳定的。
再安装webpack-dev-server,执行npm i webpack-dev-server@2.9.3 -D,
最后把webpack安装到项目依赖里,执行npm i webpack@3.8.1 --save-dev。
npm start就成功了

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值