[英]I can't run test with “vows test/*” command on windows. How to use it? node.js
[英]Vows: command not found
我從應用程序的根文件夾運行測試。 測試位於spec目錄中。
$ 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如下
{
"author": "Sunil Kumar <sunilkumar.gec56@gmail.com>",
"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"
}
}
我已經完成npm install,以便包括誓言的依賴模塊已經安裝並存在於我的node_modules /目錄中。
請問有人可能會幫助我嗎?
您還可以從當前項目的node_modules
目錄中的本地安裝運行node_modules
命令:
./node_modules/vows/bin/vows
編輯:要清楚, vows
仍然是一個Node文件,這意味着您必須將其作為節點程序(而不是獨立的CLI工具)運行。 因此,與其能夠做到這一點:
> vows -v tests.js
您必須執行以下操作:
> node ./node_modules/vows/bin/vows -v tests.js
二進制文件未安裝。 您需要執行
npm install vows -g
注意:需要root特權
-g
表示要全局安裝。
編輯:
嘗試
sudo npm config set dev true
在安裝之前。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.