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

Cannot find module 'component/dummy' #12

Open
julienchazal opened this issue Oct 2, 2014 · 4 comments
Open

Cannot find module 'component/dummy' #12

julienchazal opened this issue Oct 2, 2014 · 4 comments

Comments

@julienchazal
Copy link

Hello

I've updated your generator and chose browserify option.
Install went well but when i run grunt default task i get :

Running "connect:test" (connect) task
Started connect web server on http://127.0.0.1:9999
Running "browserify:mocha" (browserify) task
>> Error: Cannot find module 'component/dummy' from 'C:\Users\bloom\Documents\JULIEN\SITES\PROMOMIDI\V2\sitev2\app\test\mocha\spec'
Warning: Error running grunt-browserify. Use --force to continue.
Aborted due to warnings.

Any ideas please ?

thx

PS : node.js, yeoman, and bower updated

@bezoerb
Copy link
Owner

bezoerb commented Oct 2, 2014

hello again ;)
I think there was some issue regarding browserify on windows. I'll see what i can do-

@bezoerb
Copy link
Owner

bezoerb commented Oct 4, 2014

@divstudio There's some issue with the remapify plugin on windows and i couldn't figure out how to solve it yet. As a quickfix you can change the require statement in the test files to use a relative path instead.
Change the test in app/test/mocha/spec/dummyTest.js:

it('should have dummy component with init function defined', function(){
    var dummy = require('../../../scripts/component/dummy'),
          check = typeof dummy !== 'undefined' && typeof dummy.init === 'function';

    expect(check).to.equal(true);
 });

@julienchazal
Copy link
Author

Hello sorry to be so late ;)
Thx it worked !

Will i get the same problem if i choose "Jasmine" ?

@bezoerb
Copy link
Owner

bezoerb commented May 22, 2015

This generator is a bit outdated ;)
I'm currently working on an update but I couldn't say when i have time to finish it.
I think the issue is caused by the browserifyoption rather than the selected testing framework

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

2 participants