Pregunta

I ran my tests from the root folder of my app. The tests lay within the spec directory.

$ 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

My package.json is as follows

{
  "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"
  }
}

I have done npm install so that the dependency modules including vows have been installed and are present in my node_modules/ directory.

Could any one please help me out as to what might be the issue?

¿Fue útil?

Solución

The binary is not installed. You need to execute

npm install vows -g  

NOTE: requires root privilege

the -g means to install it globally.

EDIT:
try

sudo npm config set dev true 

before installation.

Otros consejos

You can also run the vows command from a local installation in the node_modules directory of your current project:

./node_modules/vows/bin/vows

EDIT: To be clear, vows is still a Node file, meaning that you would have to run it as a node program (rather than a standalone CLI tool). So, instead of being able to do this:

> vows -v tests.js

You'd have to do the following:

> node ./node_modules/vows/bin/vows -v tests.js
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top