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 in version 0.2.2 #42

Open
ssljivic opened this issue May 10, 2016 · 1 comment
Open

Cannot find module in version 0.2.2 #42

ssljivic opened this issue May 10, 2016 · 1 comment

Comments

@ssljivic
Copy link

ssljivic commented May 10, 2016

I am getting the below error with version 0.2.2 when using following:

ioc.use('util', ioc.dir('app/util'));

This was working in version 0.2.0

The exception is:

Error: Cannot find module 'C:\code\test\app\util'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.app [as load] (C:\code\test\node_modules\electrolyte\lib\sources\dir.js:46:12)
    at Container._loadSpec (C:\code\test\node_modules\electrolyte\lib\container.js:194:18)
    at Container.create (C:\code\test\node_modules\electrolyte\lib\container.js:121:10)
    at FactorySpec.Spec.create (C:\code\test\node_modules\electrolyte\lib\spec.js:83:24)
    at Container.create (C:\code\test\node_modules\electrolyte\lib\container.js:131:18)
    at FactorySpec.Spec.create (C:\code\test\node_modules\electrolyte\lib\spec.js:83:24)
    at Container.create (C:\code\test\node_modules\electrolyte\lib\container.js:131:18)
    at FactorySpec.Spec.create (C:\code\test\node_modules\electrolyte\lib\spec.js:83:24)
    at Container.create (C:\code\test\node_modules\electrolyte\lib\container.js:131:18)
    at Object.<anonymous> (C:\code\test\app\main.js:9:18)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:141:18)
    at node.js:933:3
@ssljivic
Copy link
Author

To be precise, in version 0.2.0 this worked correctly:

ioc.use('util', ioc.node('app/util'));

But in version 0.2.2 I got a warning that node() is deprecated and that it should be replaced with dir(). When I did that, I got the above error.

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

1 participant