Skip to content

Conversation

@hellotoby
Copy link

If using the data api migrations library without Typescript, migrations will fail as fs.pathExists returns a promise not a boolean.

Currently the migration will always fail in plain javascript projects with the error Error: ENOENT: no such file or directory, open '/path/to/project/tsconfig.json'

This PR changes the conditional to use fs.pathExistsSync which will return a boolean instead.

@marcgreenstock
Copy link
Owner

Hi @hellotoby, great catch!

I'd love to merge but tests are failing: see https://github.com/marcgreenstock/data-api-suite/runs/3288104728?check_suite_focus=true#step:7:165

It appears the version of fs-extra doesn't define pathExistsSync, can you please upgrade the library.

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

Successfully merging this pull request may close these issues.

2 participants