typeorm-naming-strategies icon indicating copy to clipboard operation
typeorm-naming-strategies copied to clipboard

Error when using a ncc build with "typeorm-naming-strategies"

Open maku opened this issue 2 years ago • 1 comments

After building a project with https://github.com/vercel/ncc I get an Error: "Cannot find module 'typeorm/util/StringUtils.js" when using "typeorm-naming-strategies" (which goes away when I drop using "SnakeNamingStrategy").

So the problem seems the usage of the import { snakeCase } from 'typeorm/util/StringUtils';

Does anybody has an idea how to solve this problem?

maku avatar Mar 18 '22 08:03 maku

Ey, @maku, have you tried with 2.0.0 or 4.0.0?

That was un error adding compatibility with ESM, but fixed upstream by typeorm. You can get more context from this other issue https://github.com/tonivj5/typeorm-naming-strategies/issues/22#issuecomment-1060031279

tonivj5 avatar Mar 27 '22 20:03 tonivj5