1

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?

Sunil
  • 3,424
  • 2
  • 24
  • 25

2 Answers2

6

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
MandM
  • 3,293
  • 4
  • 34
  • 56
1

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.

qiao
  • 17,941
  • 6
  • 57
  • 46
  • Tried installing globally sudo npm install -g npm http GET https://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-engine-processor@0.0.0/usr/local/lib/node_modules/subscription-engine-processor ├── buffers@0.1.1 └── redis@0.7.1 The dependencies have been installed but not the development specific ones, i.e vows. – Sunil Jan 04 '12 at 08:30
  • try `sudo npm config set dev true` before installation. – qiao Jan 04 '12 at 08:38
  • Is there any specific to run this so as to include global modules? npm start complaints about the modules being not installed. Could you also please tell where are these modules installed? – Sunil Jan 04 '12 at 09:04
  • If installed globally, the default location will be `/usr/lib/node_modules` (or `/usr/local/lib/node_modules` in some cases) – qiao Jan 04 '12 at 09:17