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

Projects
None yet
3 participants

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 coffee-script@1.6.3 -g fixes this bug, but i need 1.7.1
1.7.0 also buggy.

@vird vird referenced this issue in jashkenas/coffeescript Feb 6, 2014

Closed

1.7.0 and 1.7.1 breaks vows npm module #3354

vird commented Feb 6, 2014

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

Contributor

snoble commented Feb 13, 2014

Tested and this works. Alternatively:

if(coffee.register) coffee.register()

keeps it backwards compatible.

Owner

indexzero commented Nov 4, 2014

Fixed in #297. Published in 0.8.0

@indexzero indexzero closed this Nov 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment