mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Add fallback resolver for langchain modules (#8308)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -53,6 +53,14 @@ export const vmResolver = makeResolverFromLegacyOptions({
|
||||
modules: external ? ['langchain', ...external.split(',')] : ['langchain'],
|
||||
transitive: false,
|
||||
},
|
||||
resolve(moduleName, parentDirname) {
|
||||
if (moduleName.match(/^langchain\//)) {
|
||||
return require.resolve(`@n8n/n8n-nodes-langchain/node_modules/${moduleName}.cjs`, {
|
||||
paths: [parentDirname],
|
||||
});
|
||||
}
|
||||
return;
|
||||
},
|
||||
builtin: builtIn?.split(',') ?? [],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user