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

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/tand/Code/deep/dev/packages/deeplinks/migrations/1616701513782-links.js from /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js not supported. Instead change the require of 1616701513782-links.js in /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js to a dynamic import() which is available in all CommonJS modules. #216

Open
Tand-Anthros opened this issue Mar 3, 2024 · 0 comments

Comments

@Tand-Anthros
Copy link

Tand-Anthros commented Mar 3, 2024

tand@tand-HP-EliteBook-Folio-1040-G1:~/Code/deep/dev$ npm run local-migrate

> @deep-foundation/[email protected] local-migrate
> export NEXT_PUBLIC_ENGINES=0; export NEXT_PUBLIC_HIDEPATH=1; export npm_config_yes=true; export JWT_SECRET="{\"type\":\"HS256\",\"key\":\"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R\"}"; export MIGRATIONS_ID_TYPE_SQL=bigint; export MIGRATIONS_ID_TYPE_GQL=bigint; export MIGRATIONS_HASURA_PATH=localhost:8080; export MIGRATIONS_HASURA_SSL=0; export MIGRATIONS_HASURA_SECRET=myadminsecretkey; export NEXT_PUBLIC_DEEPLINKS_SERVER=http://localhost:3007; export NEXT_PUBLIC_GQL_PATH=localhost:3006/gql; export NEXT_PUBLIC_GQL_SSL=0 DEEPLINKS_HASURA_PATH=localhost:8080; export DEEPLINKS_HASURA_SSL=0; export MIGRATIONS_DEEPLINKS_APP_URL=http://host.docker.internal:3007 export MIGRATIONS_DEEPLINKS_URL=http://host.docker.internal:3006; cd packages/deeplinks && npm run migrate


> @deep-foundation/[email protected] migrate
> npm run package:build && npx migrate@latest up --matches '*.js'


> @deep-foundation/[email protected] package:build
> tsc --project tsconfig.json

  error : Error [ERR_REQUIRE_ESM]: require() of ES Module /home/tand/Code/deep/dev/packages/deeplinks/migrations/1616701513782-links.js from /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js not supported.
Instead change the require of 1616701513782-links.js in /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js to a dynamic import() which is available in all CommonJS modules.
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/tand/Code/deep/dev/packages/deeplinks/migrations/1616701513782-links.js from /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js not supported.
Instead change the require of 1616701513782-links.js in /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js to a dynamic import() which is available in all CommonJS modules.
    at /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js:44:17
    at Array.map (<anonymous>)
    at /home/tand/Code/deep/dev/node_modules/migrate/lib/load-migrations.js:40:30
    at FSReqCallback.oncomplete (node:fs:192:23) {
  code: 'ERR_REQUIRE_ESM'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant