
looks like the problem is in the following code
function connectorModuleNames(name) {
const names = []; // Check the name as is
if (!name.match(/^\//)) {
names.push('./connectors/' + name); // Check built-in connectors
if (name.indexOf('loopback-connector-') !== 0) {
names.push('loopback-connector-' + name); // Try loopback-connector-<name>
}
}
// Only try the short name if the connector is not from StrongLoop
if (['mongodb', 'oracle', 'mysql', 'postgresql', 'mssql', 'rest', 'soap', 'db2', 'cloudant']
.indexOf(name) === -1) {
names.push(name);
}
return names;
}
trying to check for rest file in connector folder but there no exists
i fixed it with
function connectorModuleNames(name) {
const names = []; // Check the name as is
if (!name.match(/^\//)) {
if(['kv-memory', 'memory', 'transient'].indexOf(name) !== -1) {
console.log(name)
names.push('./connectors/' + name); // Check built-in connectors
} else if (name.indexOf('loopback-connector-') !== 0) {
names.push('loopback-connector-' + name); // Try loopback-connector-<name>
}
}
// Only try the short name if the connector is not from StrongLoop
if (['mongodb', 'oracle', 'mysql', 'postgresql', 'mssql', 'rest', 'soap', 'db2', 'cloudant']
.indexOf(name) === -1) {
names.push(name);
}
return names;
}
a workaround is use the full name
{
connector: "loopback-connector-rest" instead of "rest"
}
I am having the same issue with the mongodb connector. It is not resolved by using the connectors full name.
Cannot start the application. Error: Qualified path resolution failed - none of the candidates can be found on the disk.
Source path: C:\Users\jakef\code\examplerepo\.yarn\cache\loopback-datasource-juggler-npm-4.26.0-67d3cf0749-75cc866df5.zip\node_modules\loopback-datasource-juggler\lib\connectors\loopback-connector-mongodb
Rejected candidate: C:\Users\jakef\code\examplerepo\.yarn\cache\loopback-datasource-juggler-npm-4.26.0-67d3cf0749-75cc866df5.zip\node_modules\loopback-datasource-juggler\lib\connectors\loopback-connector-mongodb
Rejected candidate: C:\Users\jakef\code\examplerepo\.yarn\cache\loopback-datasource-juggler-npm-4.26.0-67d3cf0749-75cc866df5.zip\node_modules\loopback-datasource-juggler\lib\connectors\loopback-connector-mongodb.js
Rejected candidate: C:\Users\jakef\code\examplerepo\.yarn\cache\loopback-datasource-juggler-npm-4.26.0-67d3cf0749-75cc866df5.zip\node_modules\loopback-datasource-juggler\lib\connectors\loopback-connector-mongodb.json
Rejected candidate: C:\Users\jakef\code\examplerepo\.yarn\cache\loopback-datasource-juggler-npm-4.26.0-67d3cf0749-75cc866df5.zip\node_modules\loopback-datasource-juggler\lib\connectors\loopback-connector-mongodb.node
I am having the same issue with the mongodb connector. It is not resolved by using the connectors full name.
do you have installed mongodb connector? try using .yarnrc.yml to specify the dependency
Yes, I do. The issue lies in the way datasource-juggler tries to look up multiple versions of the connector by looking in different locations and fails entirely when it fails on any of the locations it tries to look up. See this pull request.
https://github.com/strongloop/loopback-datasource-juggler/pull/1883
Another option is to pass the connector object instead of the module name.
// LB4 datasource config
const config = {
connector: require('loopback-connector-mongodb'),
// ...
};
I've upgraded to yarn 2.4.1 and hit this irreconcilable error in CI; these problems are maddening and time-consuming for those of us not native to the javascript frontend world:
Qualified path resolution failed - none of the candidates can be found on the disk.
Source path: /builds/instantlinux/apicrud-ui/.yarn/$$virtual/@blackbox-vision-ra-language-spanish-virtual-229dab0f27/0/cache/@blackbox-vision-ra-language-spanish-npm-3.12.2-f02804f106-3619e7ae0a.zip/node_modules/@blackbox-vision/ra-language-spanish/
Rejected candidate: /builds/instantlinux/apicrud-ui/.yarn/$$virtual/@blackbox-vision-ra-language-spanish-virtual-229dab0f27/0/cache/@blackbox-vision-ra-language-spanish-npm-3.12.2-f02804f106-3619e7ae0a.zip/node_modules/@blackbox-vision/ra-language-spanish/
This comes from the following line in App.js:
import spanishMessages from '@blackbox-vision/ra-language-spanish';
Somehow it's getting confused by the @ or something, generating an incorrect path for that one (out of dozens) of packages. My current workaround is to turn off the feature that this import enables: Spanish language translations. But that's hardly satisfying. It's hard to gather info to submit my own bug report, because the problem only happens in my CI builds (on throwaway containers).
@instantlinux if the issue only arises in CI, check if your ignore file (e.g. .ebignore for AWS Elastic Beanstalk) matches the path not being found.
In my case, I had src in my ignore file instead of ./src, so it left out some subdirectory from a subdependency.
I arrived here via Google, so maybe it鈥檚 not related to this issue, but it cost me a few hours to figure out, so I figured I鈥檇 share, just in case.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.