Open axeldelafosse opened 1 year ago
I have bug like you
import { camelCase } from 'typeorm/util/StringUtils.js';
Add .js
to the end
Expected behavior when the ts file is compiled with tsc
and run with node
:
bun i typescript typeorm
echo "import { camelCase } from 'typeorm/util/StringUtils';console.log(camelCase('correct_output'))" > temp.ts
bun run tsc temp.ts
node temp.js
> correctOutput
Actual behavior when running file directly with bun
:
bun i typeorm
echo "import { camelCase } from 'typeorm/util/StringUtils';console.log(camelCase('correct_output'))" > temp.ts
bun run temp.ts
> error: Cannot find module "typeorm/util/StringUtils" from "/home/zikoat/dev/repro-bug/temp.ts"
@Electroid Repro given, can you tag this correctly?
This issue is stale and may be closed due to inactivity. If you're still running into this, please leave a comment.
What version of Bun is running?
1.0.4+745b6b94ee56cad24d475799690cc9a89957d15b
What platform is your computer?
Darwin 23.0.0 arm64 arm
What steps can reproduce the bug?
Run
bun dist/main.js
in a NestJS app using a similartypeorm
import as https://github.com/tonivj5/typeorm-naming-strategies/blob/master/src/snake-naming.strategy.tsWhat is the expected behavior?
What do you see instead?
Additional information
No response