2014-07-10 3 views
3

Windows에서 jasmine-node 테스트를 실행하고 있습니다. 내 꾸러미에 다음 명령이있어 .json. 이 문제를 해결하기 위해 아마jasmine-node가 창에서 작동하지 않습니다.

TypeError: Cannot read property '1' of null 
    at Object.<anonymous> (C:\Documents and Settings\rohan\RubymineProjects\Node 
Demo\node_modules\jasmine-node\lib\jasmine-node\index.js:24:57) 
    at Module._compile (module.js:456:26) 
    at Object.Module._extensions..js (module.js:474:10) 
    at Module.load (module.js:356:32) 
    at Function.Module._load (module.js:312:12) 
    at Module.require (module.js:364:17) 
    at require (module.js:380:17) 
    at Object.<anonymous> (C:\Documents and Settings\rohan\RubymineProjects\Node 
Demo\node_modules\jasmine-node\lib\jasmine-node\cli.js:1:77) 
    at Module._compile (module.js:456:26) 
    at Object.Module._extensions..js (module.js:474:10) 
npm ERR! Test failed. See above for more details. 
npm ERR! not ok code 0 
+0

Windows 명령 프롬프트에서'./node_modules/.bin/jasmine-node --coffee sample_spec.coffee' 명령을 실행하면 작동합니까? 전역 적으로'jasmine-node'를 설치 했습니까? 'spec /'은'spec /'디렉토리 안에 있습니까? –

+0

나는 nodej를 업데이트하고'npm update -g'를 호출 한 후에 같은 오류를 반환합니다. – inf3rno

+0

@RodrigoMedeiros'./node_modules/.bin/jasmine-node'는 같은 오류를 반환합니다. – inf3rno

답변

0

하지 않는 가장 좋은 방법,하지만 난 Cygwin에서 설치하고 단지 내 자스민의 모든 것을 통해 명령을 실행 : 나는 NPM 테스트를 실행할 때

"scripts": { 
    "test": "./node_modules/.bin/jasmine-node --coffee sample_spec.coffee", 
    } 

, 나는 다음과 같은 오류를 얻고있다 . Windows의 명령 줄을 통해 jasmine과 같은 모듈을 사용하면 편리합니다.