スクリーンショット 2016-06-25 12.39.20

【TypeScript】sh: tsc: command not found (npm run build時)

【TypeScript】sh: tsc: command not found (npm run build時)

npm run buildした際にこういうのでたら

sh: tsc: command not found

▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

npm ERR! Darwin 14.3.0
npm ERR! argv “/usr/local/Cellar/node/6.2.2/bin/node” “/usr/local/bin/npm” “run” “tsc”
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! an2_ts_playgrond@1.0.0 tsc: `tsc -p .`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the an2_ts_playgrond@1.0.0 tsc script ‘tsc -p .’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the an2_ts_playgrond package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc -p .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs an2_ts_playgrond
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls an2_ts_playgrond
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR! /Users/No51/Desktop/Git/angu2_type/an2_ts_playgrond/npm-debug.log
▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

npm ERR! Darwin 14.3.0
npm ERR! argv “/usr/local/Cellar/node/6.2.2/bin/node” “/usr/local/bin/npm” “run” “build”
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! an2_ts_playgrond@1.0.0 build: `npm run tsc && npm run browserify`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the an2_ts_playgrond@1.0.0 build script ‘npm run tsc && npm run browserify’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the an2_ts_playgrond package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run tsc && npm run browserify
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs an2_ts_playgrond
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls an2_ts_playgrond
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR! /Users/No51/Desktop/Git/angu2_type/an2_ts_playgrond/npm-debug.log
[an2_ts_playgrond]

————————–

sh: tsc: command not found

これ。
tscがコマンドでパス通っていない可能性大
npm install tsc

をやってみてください。
npm のグローバルのパスが通っていればうまくいくはずです。

(Visited 1 times, 1 visits today)