mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
fix: Add fallback resolver for langchain modules (#8308)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
parent
63b738a542
commit
851060dd3f
|
@ -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(',') ?? [],
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue