You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/ben/democracy-app/node_modules/edgedb/dist/reflection/index' imported from /home/ben/democracy-app/dbschema/edgeql-js/set.ts
Did you mean to import "edgedb/dist/reflection/index.js"?"
Manually changing all occurrences of import from "edgedb/dist/reflection/index" and import from "edgedb/dist/primitives/buffer" to import from "edgedb/dist/reflection/index.js" and import from "edgedb/dist/primitives/buffer.js" fixes the issue.
Versions
OS: Ubuntu Jammy Jellyfish
EdgeDB version: 5.3+cc878d8
EdgeDB CLI version: 5.1.0+7c5764f
edgedb-js version: 1.5.5
@edgedb/generate version: 0.5.3
TypeScript version: ^5.1.6
Node version: 20.12.2
The text was updated successfully, but these errors were encountered:
We have an open issue to rehaul the TS output to take into account all of the new module resolution modes supported by both TypeScript, alternative runtimes (like Deno and Bun), and bundlers, but in the meantime we can figure out what the right incantation for your own particular setup should be.
benrbowers
changed the title
When using edgeql-js with tsx, imported modules are not resolved correctly.
Remix/Vite/EdgeDB: When using edgeql-js with tsx, imported modules are not resolved correctly.
May 22, 2024
Code
Error or desired behavior
"Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/ben/democracy-app/node_modules/edgedb/dist/reflection/index' imported from /home/ben/democracy-app/dbschema/edgeql-js/set.ts
Did you mean to import "edgedb/dist/reflection/index.js"?"
Manually changing all occurrences of
import from "edgedb/dist/reflection/index"
andimport from "edgedb/dist/primitives/buffer"
toimport from "edgedb/dist/reflection/index.js"
andimport from "edgedb/dist/primitives/buffer.js"
fixes the issue.Versions
edgedb-js
version: 1.5.5@edgedb/generate
version: 0.5.3The text was updated successfully, but these errors were encountered: