Skip to content
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

[JS] Genkit Vertex plugin not working in ESM mode #907

Open
oerhahon opened this issue Sep 14, 2024 · 0 comments
Open

[JS] Genkit Vertex plugin not working in ESM mode #907

oerhahon opened this issue Sep 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working js

Comments

@oerhahon
Copy link

Describe the bug
node:internal/modules/esm/resolve:254
throw new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base), String(resolved));
^

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'C:\sample\node_modules@genkit-ai\vertexai\lib\vector-search' is not supported resolving ES modules imported from C:\sample\node_modules@genkit-ai\vertexai\lib\index.mjs
at finalizeResolution (node:internal/modules/esm/resolve:254:11)
at moduleResolve (node:internal/modules/esm/resolve:921:10)
at defaultResolve (node:internal/modules/esm/resolve:1124:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:526:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:249:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49) {
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file:///C:/sample/node_modules/@genkit-ai/vertexai/lib/vector-search'
}

Node.js v22.5.1

"@genkit-ai/vertexai": "^0.5.13",

To Reproduce
use genkit init, rename src/index.ts to src/index.mjs, and add "type": "module" to package

@oerhahon oerhahon added bug Something isn't working js labels Sep 14, 2024
@oerhahon oerhahon changed the title [JS] Genkit Vertex plug in not working in ESM mode [JS] Genkit Vertex plugin not working in ESM mode Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working js
Projects
None yet
Development

No branches or pull requests

2 participants