运行npm run build命令时出现以下错误 -
npm run build
实际问题,我没有在启动后进入主屏幕,在启动画面后始终显示白屏 -
投掷错误
[16:28:06] ionic-app-script task: "build"
[16:28:06] Error: Failed to transpile program
Error: Failed to transpile program
at BuildError.Error (native)
at new BuildError (/Users/rakeshjha/HP/TISA/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at /Users/rakeshjha/HP/TISA/node_modules/@ionic/app-scripts/dist/transpile.js:137:20
at transpileWorker (/Users/rakeshjha/HP/TISA/node_modules/@ionic/app-scripts/dist/transpile.js:103:12)
at Object.transpile (/Users/rakeshjha/HP/TISA/node_modules/@ionic/app-scripts/dist/transpile.js:61:12)
at buildProject (/Users/rakeshjha/HP/TISA/node_modules/@ionic/app-scripts/dist/build.js:97:78)
at /Users/rakeshjha/HP/TISA/node_modules/@ionic/app-scripts/dist/build.js:47:16
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! TISA@ build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the TISA@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sumitjha/.npm/_logs/2017-06-05T10_58_06_410Z-debug.log
Sumits-MacBook-Pro:TISA sumitjha$ npm run build
文件2017-06-05T10_58_06_410Z-debug.log详细日志 -
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@5.0.0
3 info using node@v6.10.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle TISA@~prebuild: TISA@
6 silly lifecycle TISA@~prebuild: no script for prebuild, continuing
7 info lifecycle TISA@~build: TISA@
8 verbose lifecycle TISA@~build: unsafe-perm in lifecycle true
9 verbose lifecycle TISA@~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/rakeshjha/HP/TISA/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki
10 verbose lifecycle TISA@~build: CWD: /Users/rakeshjha/HP/TISA
11 silly lifecycle TISA@~build: Args: [ '-c', 'ionic-app-scripts build' ]
12 silly lifecycle TISA@~build: Returned: code: 1 signal: null
13 info lifecycle TISA@~build: Failed to exec build script
14 verbose stack Error: TISA@ build: `ionic-app-scripts build`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid TISA@
16 verbose cwd /Users/rakeshjha/HP/TISA
17 verbose Darwin 16.5.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
19 verbose node v6.10.3
20 verbose npm v5.0.0
21 error code ELIFECYCLE
22 error errno 1
23 error TISA@ build: `ionic-app-scripts build`
23 error Exit status 1
24 error Failed at the TISA@ build script.
24 error This is probably not a problem with npm. There is likely additional
logging output above.
25 verbose exit [ 1, true ]