I am compiling typescript files using tsc -p src --outDir build it compiles properly. But when I give same in package.json in scripts as "tsc": "tsc -p src --outDir build" and do npm run tsc.
It gives me following error:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'tsc' ]
2 info using npm@3.8.3
3 info using node@v5.10.1
4 verbose run-script [ 'pretsc', 'tsc', 'posttsc' ]
5 info lifecycle Records@1.0.0~pretsc: Records@1.0.0
6 silly lifecycle Records@1.0.0~pretsc: no script for pretsc, continuing
7 info lifecycle Records@1.0.0~tsc: Records@1.0.0
8 verbose lifecycle Records@1.0.0~tsc: unsafe-perm in lifecycle true
9 verbose lifecycle Records@1.0.0~tsc: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/satish/Documents/Office/Everteam-Fork/micro-services/records-webapp/src/main/webapp/node_modules/.bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle Records@1.0.0~tsc: CWD: /Users/satish/Documents/Office/Everteam-Fork/micro-services/records-webapp/src/main/webapp
11 silly lifecycle Records@1.0.0~tsc: Args: [ '-c', 'tsc -p src --outDir build' ]
12 silly lifecycle Records@1.0.0~tsc: Returned: code: 2 signal: null
13 info lifecycle Records@1.0.0~tsc: Failed to exec tsc script
14 verbose stack Error: Records@1.0.0 tsc: tsc -p src --outDir build
14 verbose stack Exit status 2
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid Records@1.0.0
16 verbose cwd /Users/satish/Documents/Office/Everteam-Fork/micro-services/records-webapp/src/main/webapp
17 error Darwin 15.0.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "tsc"
19 error node v5.10.1
20 error npm v3.8.3
21 error code ELIFECYCLE
22 error Records@1.0.0 tsc: tsc -p src --outDir build
22 error Exit status 2
23 error Failed at the Records@1.0.0 tsc script 'tsc -p src --outDir build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the Records package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error tsc -p src --outDir build
23 error You can get information on how to open an issue for this project with:
23 error npm bugs Records
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls Records
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I am compiling typescript files using tsc -p src --outDir build it compiles properly. But when I give same in package.json in scripts as "tsc": "tsc -p src --outDir build" and do npm run tsc.
It gives me following error:
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'tsc' ] 2 info using npm@3.8.3 3 info using node@v5.10.1 4 verbose run-script [ 'pretsc', 'tsc', 'posttsc' ] 5 info lifecycle Records@1.0.0~pretsc: Records@1.0.0 6 silly lifecycle Records@1.0.0~pretsc: no script for pretsc, continuing 7 info lifecycle Records@1.0.0~tsc: Records@1.0.0 8 verbose lifecycle Records@1.0.0~tsc: unsafe-perm in lifecycle true 9 verbose lifecycle Records@1.0.0~tsc: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/satish/Documents/Office/Everteam-Fork/micro-services/records-webapp/src/main/webapp/node_modules/.bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 10 verbose lifecycle Records@1.0.0~tsc: CWD: /Users/satish/Documents/Office/Everteam-Fork/micro-services/records-webapp/src/main/webapp 11 silly lifecycle Records@1.0.0~tsc: Args: [ '-c', 'tsc -p src --outDir build' ] 12 silly lifecycle Records@1.0.0~tsc: Returned: code: 2 signal: null 13 info lifecycle Records@1.0.0~tsc: Failed to exec tsc script 14 verbose stack Error: Records@1.0.0 tsc: (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid Records@1.0.0
16 verbose cwd /Users/satish/Documents/Office/Everteam-Fork/micro-services/records-webapp/src/main/webapp
17 error Darwin 15.0.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "tsc"
19 error node v5.10.1
20 error npm v3.8.3
21 error code ELIFECYCLE
22 error Records@1.0.0 tsc:
tsc -p src --outDir build
14 verbose stack Exit status 2 14 verbose stack at EventEmitter.tsc -p src --outDir build
22 error Exit status 2 23 error Failed at the Records@1.0.0 tsc script 'tsc -p src --outDir build'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the Records package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error tsc -p src --outDir build 23 error You can get information on how to open an issue for this project with: 23 error npm bugs Records 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls Records 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]