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
When running ts-node-esm ./node_modules/typeorm-extension/bin/cli.mjs seed:create -n src/database/seeds/test the resulting file imports typeorm-extension.js on line 2. This is an unrecognized import and should be typeorm-extension (without the .js extension).
Additional Details
// generated seed fileimport{DataSource}from'typeorm';import{Seeder,SeederFactoryManager}from'typeorm-extension.js';// <-- shouldn't have the extension hereexportclassTest1711706973402implementsSeeder{track=false;publicasyncrun(dataSource: DataSource,factoryManager: SeederFactoryManager): Promise<any>{}}
// tsconfig.json{"compilerOptions": {"target": "es5","lib": ["dom","dom.iterable","esnext"],"allowJs": true,"skipLibCheck": true,"strict": true,"noEmit": true,"esModuleInterop": true,"module": "esnext","moduleResolution": "bundler","resolveJsonModule": true,"isolatedModules": true,"jsx": "preserve","incremental": true,"plugins": [{"name": "next"}],"baseUrl": ".","paths": {"@/*": ["./src/*"]},"emitDecoratorMetadata": true,"experimentalDecorators": true,"sourceMap": true},"include": ["next-env.d.ts","**/*.ts","**/*.tsx",".next/types/**/*.ts"],"exclude": ["node_modules"],"ts-node": {"esm": true,"compilerOptions": {// compilerOptions specified here will override those declared below,// but *only* in ts-node. Useful if you want ts-node and tsc to use// different options with a single tsconfig.json."module": "commonjs","moduleResolution": "node"}}}
Versions
Reproduction
When running
ts-node-esm ./node_modules/typeorm-extension/bin/cli.mjs seed:create -n src/database/seeds/test
the resulting file importstypeorm-extension.js
on line 2. This is an unrecognized import and should betypeorm-extension
(without the .js extension).Additional Details
Steps to reproduce
ts-node-esm ./node_modules/typeorm-extension/bin/cli.mjs seed:create -n src/database/seeds/test
What is Expected?
In the generated Seed module, the import on Line 2 should be from
typeorm-extension
without a .js extensionWhat is actually happening?
The .js extension is added.
Note: in reviewing src/seeder/utils/template.ts I don't see how this extension is getting added.
The text was updated successfully, but these errors were encountered: