Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module '/.../test/some-test' (coffeescript 1.7.1 and vows 0.7.0) #296

Closed
vird opened this issue Feb 5, 2014 · 3 comments

Comments

@vird
Copy link

vird commented Feb 5, 2014

Env Gentoo Linux 64bit
npm install coffee-script -g
npm install coffee-script
npm install vows -g
npm install vows
vows --version
vows 0.7.0
coffee -v
CoffeeScript version 1.7.1
mkdir test
nano test/some-test.coffee

vows = require('vows')
assert = require('assert');
class DeepThought
a : 1
vows
.describe('Deep Thought')
.addBatch
'An instance of DeepThought':
topic: new DeepThought
'should know the answer to the ultimate question of life': (deepThought)->
assert.equal deepThought.a, 1
.export(module)

vows

module.js:340
throw err;
^
Error: Cannot find module '/opt/ext/new_workspace/bug_report/test/some-test'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /usr/lib64/node_modules/vows/bin/vows:567:19
at Array.reduce (native)
at importSuites (/usr/lib64/node_modules/vows/bin/vows:560:18)
at Object. (/usr/lib64/node_modules/vows/bin/vows:290:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

with coffeescript 1.6.3 all was ok. npm install [email protected] -g fixes this bug, but i need 1.7.1
1.7.0 also buggy.

@vird
Copy link
Author

vird commented Feb 6, 2014

fix proposal
insert coffee.register();
after
specFileExt = /.(-|_).(js|coffee)$/;

@snoble
Copy link

snoble commented Feb 13, 2014

Tested and this works. Alternatively:

if(coffee.register) coffee.register()

keeps it backwards compatible.

@indexzero
Copy link

Fixed in #297. Published in 0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants