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
[Bug]: Unable to resolve module @ledgerhq/domain-service/signers/index #6173
Comments
Fixed by adding custom const path = require("path");
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const defaultModuleResolver = getDefaultConfig(__dirname).resolver.resolveRequest;
const config = {
// your other option here
// ...
resolver: {
resolveRequest: (context, moduleName, platform) => {
try {
return context.resolveRequest(context, moduleName, platform);
} catch (error) {
console.warn('\n1️⃣ context.resolveRequest cannot resolve: ', moduleName);
}
try {
const resolution = require.resolve(moduleName, {
paths: [path.dirname(context.originModulePath), ...config.resolver.nodeModulesPaths],
});
if (path.isAbsolute(resolution)) {
return {
filePath: resolution,
type: "sourceFile",
};
}
} catch (error) {
console.warn('\n2️⃣ require.resolve cannot resolve: ', moduleName);
}
try {
return defaultModuleResolver(context, moduleName, platform);
} catch (error) {
console.warn('\n3️⃣ defaultModuleResolver cannot resolve: ', moduleName);
}
try {
return {
filePath: require.resolve(moduleName),
type: "sourceFile",
};
} catch (error) {
console.warn('\n4️⃣ require.resolve cannot resolve: ', moduleName);
}
try {
const resolution = getDefaultConfig(require.resolve(moduleName)).resolver?.resolveRequest
return resolution(context, moduleName, platform);
} catch (error) {
console.warn('\n5️⃣ getDefaultConfig cannot resolve: ', moduleName);
}
},
},
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config); |
@bobo2018cp you are not part of the organization, please contact a maintainer if you need to run this command. |
3 similar comments
@bobo2018cp you are not part of the organization, please contact a maintainer if you need to run this command. |
@bobo2018cp you are not part of the organization, please contact a maintainer if you need to run this command. |
@bobo2018cp you are not part of the organization, please contact a maintainer if you need to run this command. |
Hello @iGroza, where do you have this error, please? Directly on Ledger Live or on another project? |
Impacted Library name
@ledgerhq/hw-app-eth
Impacted Library version
6.35.4
Describe the bug
Error durning initialisation:
Expected behavior
initialisation without error
Additional context
The text was updated successfully, but these errors were encountered: