Windows10でnpm installした時のエラーとhttp-serverのエラー
コマンドプロンプトから、
npm install
でエラー。
> bower install bower ENOGIT git is not installed or not in the PATH npm ERR! Windows_NT 10.0.10240 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! node v4.3.1 npm ERR! npm v2.14.12 npm ERR! code ELIFECYCLE npm ERR! angular-phonecat@0.0.0 postinstall: `bower install` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular-phonecat@0.0.0 postinstall script 'bower install'. npm ERR! This is most likely a problem with the angular-phonecat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! bower install npm ERR! You can get their info via: npm ERR! npm owner ls angular-phonecat npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\kkkkkkkkkubotti\Documents\test_angular\angular-phonecat\npm-debug.log
TortoiseGit はインストールしていたので、
右クリック > Git Bash Here
でコマンドプロンプトっぽいMINGW64というのを開き、
そこで
npm install
と打ったらエラーが出ずに実行できた。
エラーその2
Starting up http-server, serving ./ on port: 8000 Hit CTRL-C to stop the server [Fri, 11 Mar 2016 14:22:41 GMT] "GET /" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36" _http_outgoing.js:351 throw new TypeError('The header content contains invalid characters'); ^ TypeError: The header content contains invalid characters at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:351:13) at ResponseStream.(anonymous function) [as setHeader] (C:\Users\kkkkkkkkkubotti\Documents\test_angular\angular-phonecat\node_modules\http-server\node_modules\union\lib\response-stream.js:86:34) at C:\Users\kkkkkkkkkubotti\Documents\test_angular\angular-phonecat\node_modules\http-server\node_modules\ecstatic\lib\ecstatic\showdir.js:42:13 at FSReqWrap.oncomplete (fs.js:82:15) npm ERR! Windows_NT 10.0.10240 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" npm ERR! node v4.3.1 npm ERR! npm v2.14.12 npm ERR! code ELIFECYCLE npm ERR! angular-phonecat@0.0.0 start: `http-server -a 0.0.0.0 -p 8000` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular-phonecat@0.0.0 start script 'http-server -a 0.0.0.0 -p 8000'. npm ERR! This is most likely a problem with the angular-phonecat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! http-server -a 0.0.0.0 -p 8000 npm ERR! You can get their info via: npm ERR! npm owner ls angular-phonecat npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\kkkkkkkkkubotti\Documents\test_angular\angular-phonecat\npm-debug.log
npm install http-server -D
で直ったっぽい。
testでのエラー
npm test
INFO [Firefox 44.0.0 (Windows 10 0.0.0)]: Connected on socket _0Uvt7JxuBpjcJ7RsCX6 with id 47877215 ERROR [karma]: [TypeError: The header content contains invalid characters] TypeError: The header content contains invalid characters at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:351:13) at ServerResponse.res.setHeader (C:\Users\kubotad\Documents\test_angular\angular-phonecat\node_modules\karma\node_modules\connect\lib\patch.js:134:22) at Object.setNoCacheHeaders (C:\Users\kubotad\Documents\test_angular\angular-phonecat\node_modules\karma\lib\middleware\common.js:76:12) at C:\Users\kubotad\Documents\test_angular\angular-phonecat\node_modules\karma\lib\middleware\karma.js:109:18 at C:\Users\kubotad\Documents\test_angular\angular-phonecat\node_modules\karma\lib\middleware\common.js:63:35 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3) npm ERR! Test failed. See above for more details.
npm install karma -D
で直ったっぽい。