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
to .map((pattern) => glob.sync(path.resolve(process.cwd(), 'apps/api', pattern))), then it finds the seed and factory files.
Specifying a root with the -r argument at the CLI should, in my opinion, alter the way that fonction resolves paths to find the globs from the ormconfig.
The text was updated successfully, but these errors were encountered:
coaxial
changed the title
File loader always uses process.cwd(), fails to find files with monorepos
File loader always uses process.cwd(), fails to find seeds and factories in monorepos with globs
Mar 21, 2021
Given an ormconfig.js file with:
The ormconfig file is located at
apps/api/src/config/ormconfig.js
within a monorepo, andpackage.json
is located at.
/process.cwd()
.Then the file loader fails to find the factory or seed files.
However, if I change this line:
typeorm-seeding/src/utils/file.util.ts
Line 10 in 4136b0e
.map((pattern) => glob.sync(path.resolve(process.cwd(), 'apps/api', pattern)))
, then it finds the seed and factory files.Specifying a root with the
-r
argument at the CLI should, in my opinion, alter the way that fonction resolves paths to find the globs from the ormconfig.The text was updated successfully, but these errors were encountered: