MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getNodeModulesPackagePath

Function getNodeModulesPackagePath

packages/components/src/utils.ts:218–232  ·  view source on GitHub ↗
(packageName: string)

Source from the content-addressed store, hash-verified

216 * @returns {string}
217 */
218export const getNodeModulesPackagePath = (packageName: string): string => {
219 const checkPaths = [
220 path.join(__dirname, '..', 'node_modules', packageName),
221 path.join(__dirname, '..', '..', 'node_modules', packageName),
222 path.join(__dirname, '..', '..', '..', 'node_modules', packageName),
223 path.join(__dirname, '..', '..', '..', '..', 'node_modules', packageName),
224 path.join(__dirname, '..', '..', '..', '..', '..', 'node_modules', packageName)
225 ]
226 for (const checkPath of checkPaths) {
227 if (fs.existsSync(checkPath)) {
228 return checkPath
229 }
230 }
231 return ''
232}
233
234/**
235 * Get input variables

Callers 5

getToolsMethod · 0.90
getToolsMethod · 0.90
getToolsMethod · 0.90
getToolsMethod · 0.90
getToolsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected