Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knex migration using initial migration example not working #243

Open
roycechua opened this issue Feb 27, 2024 · 0 comments
Open

Knex migration using initial migration example not working #243

roycechua opened this issue Feb 27, 2024 · 0 comments
Assignees
Labels
🐞 Bug Something isn't working

Comments

@roycechua
Copy link

roycechua commented Feb 27, 2024

Describe the Bug (버그 설명)

Unable to do do knex migration on initial generated template with knex. Running npm run migrate produced an error

Version to Reproduce (현재 사용한 버전)

knex: 2.2.0
ts-node: 10.9.1
typescript: 4.7.4

Steps to Reproduce (재현 순서)

  1. Generate a new template
  2. Select knex
  3. Open a terminal and navigate to the template
  4. Run npm install (if node_modules hasn't been installed already)
  5. Run docker compose up
  6. Once environment is setup, run knex migration with npm run migrate
  7. Error should be encountered at this point

Expected Behavior (예상 동작)

Migration should happen without any errors like this

Screenshot 2024-02-27 at 9 18 06 PM

Actual Behavior (실제 동작)

From the generation of the template (using knex)
On running the command npm run migrate, I encountered this error

Screenshot 2024-02-27 at 9 17 29 PM

I identified the fix for this but encountered another error on the migration

Screenshot 2024-02-27 at 9 17 49 PM

So there are really 2 problems, and here is a PR I made if you want to consider my small fix

Additional Context (추가 사항)

Might be related to how knex and TS in terms of handling exports

@roycechua roycechua added the 🐞 Bug Something isn't working label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants