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

Bug: #1206

Open
JoranLive opened this issue Nov 20, 2024 · 0 comments
Open

Bug: #1206

JoranLive opened this issue Nov 20, 2024 · 0 comments

Comments

@JoranLive
Copy link

Versions

  • Node: 20
  • OS: Linux Ubuntu 24.04
  • typeorm@0.3.20
  • typeorm-extension@3.6.2

My package.json contains those scripts:
"seed:run": "cd ./dist && npx typeorm-extension seed:run -d ./src/app/data-sources/app-data-source.js", "seed:run:dev": "ts-node -r tsconfig-paths/register ./node_modules/typeorm-extension/bin/cli.cjs seed:run -d ./src/app/data-sources/app-data-source.ts", "migration:run": "cd ./dist && npx typeorm migration:run -d ./src/app/data-sources/app-data-source.js", "migration:run:dev": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run -d ./src/app/data-sources/app-data-source.ts",

My database options are:
{"type":"postgres","host":"localhost","port":5432,"database":"MASKED","schema":"MASKED","username":"MASKED","password":"MASKED","entities":["src/app/entities/**/*.{js,ts}"],"migrations":["src/app/migrations/**/*.{js,ts}"],"seeds":["src/app/seeds/**/*.{js,ts}"],"ssl":"enabled"}

Targets with ':dev' suffix are using ts-node. Those without any suffix uses node and transpiled code from dist folder.

"npm run migration:run" and "npm run migration:run:dev" work fine.

"npm run seed:run" works fine but not "npm run seed:run:dev".

I'm able to make it working but only if I provide absolute path for entities and seeds.

I tried many things like adding "dist/" or using "--root" option or specifying "NODE_PATH" without any success.

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