2012-01-04 6 views
1

내 응용 프로그램의 루트 폴더에서 테스트를 실행했습니다. 테스트는 spec 디렉토리 내에 있습니다. 내가 서약을 포함한 종속 모듈을 설치하고 내 node_modules/디렉토리에 존재하는 한되도록 설치 NPM했을맹세 : 명령을 찾을 수 없습니다.

{ 
    "author": "Sunil Kumar <[email protected]>", 
    "name": "subscription-engine-processor", 
    "description": "Node.js server for Subscription Engine processor application.", 
    "version": "0.0.0", 
    "scripts": { 
    "start": "node index.js" 
    }, 
    "repository": { 
    "type": "git", 
    "url": "" 
    }, 
    "main": "./index", 
    "engines": { 
    "node": "~0.6.6" 
    }, 
    "dependencies": { 
    "buffers": "0.1.1", 
    "redis": "0.7.1" 
    }, 
    "devDependencies": { 
    "vows": "0.6.x" 
    } 
} 

을 다음과 같이

$ vows 

No command 'vows' found, did you mean: 
    Command 'vos' from package 'openafs-client' (universe) 
    Command 'voms' from package 'voms-server' (universe) 
vows: command not found 

내 package.json이다.

문제가 될 수있는 사람을 도와주세요.

답변

1

바이너리가 설치되어 있지 않습니다. 당신은

npm install vows -g 

주를 실행해야합니다 세계적으로 설치하려면 루트 권한이

-g 수단을 필요로한다.

는 편집 :
설치하기 전에

sudo npm config set dev true 

을 시도합니다.

./node_modules/vows/bin/vows 

편집 :

+0

전 세계적으로 설치 sudo는 NPM -g 설치 NPM HTTP GET은 https :/

> vows -v tests.js 

다음해야 할 것 /registry.npmjs.org/redis/0.7.1 npm http GET https://registry.npmjs.org/buffers/0.1.1 npm http 304 https://registry.npmjs.org/redis/0.7.1 npm http 304 https://registry.npmjs.org/buffers/0.1.1 subscription- [email protected]/usr/local/lib/node_modules/subscription-engine-processor ├── [email protected] └── [email protected]는 종속성이 설치되어 있지만 한 발달과 관련된 것들, 즉 서원. – Sunil

+0

설치 전에'sudo npm config set dev true '를 시도하십시오. – qiao

+0

전역 모듈을 포함하도록 특정 실행 파일이 있습니까? npm은 모듈이 설치되지 않았다는 불만을 시작합니다. 이 모듈이 설치된 위치를 알려주시겠습니까? – Sunil

6

또한 현재 프로젝트의 node_modules 디렉토리에 로컬 설치에서 맹세 명령을 실행할 수 있습니다 명확하게하기 위해, vows 당신이해야한다는 것을 의미 여전히 노드 파일입니다 독립 실행 형 CLI 도구가 아닌 노드 프로그램으로 실행하십시오. 그래서, 대신에이 작업을 수행 할 수있는의 : 시도

> node ./node_modules/vows/bin/vows -v tests.js 
관련 문제