You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using freshy in an app causes an error if a submodule is using it too.
In our case, we're using makara (adaro) as a view engine which uses freshy to load dustjs. In our project we use freshy as a dev dependency to reload modules that use stubbed components. Since we have it as a dependency, npm will use the outer dependency.
However in that case freshy will error saying it can not find dustjs-linkedin.
Create an index.js file with the following content:
var makara = require("makara");
makara.dust({});
Run node index.js -> will cause the following error:
Error: Cannot find module 'dustjs-linkedin'
at Function.Module._resolveFilename (module.js:338:15)
at Function.require.resolve (module.js:384:19)
at snapshot (/Users/towalter/workspace/mobile.de/freshy-test/node_modules/freshy/index.js:67:34)
at getFresh (/Users/towalter/workspace/mobile.de/freshy-test/node_modules/freshy/index.js:16:12)
at resolve (/Users/towalter/workspace/mobile.de/freshy-test/node_modules/freshy/index.js:93:19)
at exports.create (/Users/towalter/workspace/mobile.de/freshy-test/node_modules/makara/node_modules/adaro/lib/engine.js:43:16)
at Object.<anonymous> (/Users/towalter/workspace/mobile.de/freshy-test/index.js:3:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
The text was updated successfully, but these errors were encountered:
Ooh, it looks like freshy doesn't resolve inter-module paths like I thought it did when I used it in makara. This would work with npm 3, which is why I didn't notice it.
Using freshy in an app causes an error if a submodule is using it too.
In our case, we're using makara (adaro) as a view engine which uses freshy to load dustjs. In our project we use freshy as a dev dependency to reload modules that use stubbed components. Since we have it as a dependency, npm will use the outer dependency.
However in that case freshy will error saying it can not find
dustjs-linkedin
.Steps to reproduce:
Init a new npm module
Install and save dependencies
Create an
index.js
file with the following content:Run
node index.js
-> will cause the following error:The text was updated successfully, but these errors were encountered: