Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to run Jison tests with Node.js?

How to run Jison tests with Node.js?


Trying to run Jison unit tests, but the command fails. How do I fix that?

$ git clone git://
Cloning into 'jison'...
remote: Counting objects: 2667, done.
remote: Compressing objects: 100% (1106/1106), done.
remote: Total 2667 (delta 1523), reused 2644 (delta 1501)
Receiving objects: 100% (2667/2667), 731.51 KiB | 129 KiB/s, done.
Resolving deltas: 100% (1523/1523), done.

$ cd jison/
$ make test
node tests/all-tests.js

        throw e; // process.nextTick error, or 'error' event on first tick
Error: Cannot find module 'jison'
    at Function._resolveFilename (module.js:332:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:354:17)
    at new require (module.js:370:17)
    at /private/tmp/jison/lib/jison/ebnf.js:43:18
    at Object. (/private/tmp/jison/lib/jison/ebnf.js:150:2)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
make: *** [test] Error 1
Problem courtesy of: Paul


Commands I used to fix the error:

npm install
rm -rf node_modules/jison
ln -s ../ node_modules/jison

npm install downloads all dependencies into ./node_modules, but that includes a copy of jison.

Solution courtesy of: Paul


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

How to run Jison tests with Node.js?


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription