"...git@git.duniter.org:clients/java/duniter4j.git" did not exist on "a5bc7533cae1cb4ae62c3f54c6a7ec36d911649e"
Wrong loading with autoStack in a module
When we make a new module, depending on duniter
and calling duniter.statics.autoStack()
, the stack tries to find the modules in node_modules/duniter/package.json
instead of local package.json
.
This behavior could be fixed by adding a 2nd parameter to autoStack(), giving the directory where to look at:
autoStack: (priorityModules, dir) => {
const pjson = require(path.join(dir || __dirname, './package.json'));
// [...]
}
And on the call side:
const stack = require('duniter').statics.autoStack([{
name: 'duniter-hello',
required: require('./index')
}], __dirname)
Or with #989 (closed):
require('duniter').statics.quickRun(__dirname, './index.js')