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

Problems with running server locally #29

Open
bartolomej opened this issue Nov 4, 2023 · 0 comments · May be fixed by #30
Open

Problems with running server locally #29

bartolomej opened this issue Nov 4, 2023 · 0 comments · May be fixed by #30

Comments

@bartolomej
Copy link

Current Behavior

I've noticed a few issues when I tried to setup and run this project.

  1. Invalid default MIGRATION_PATH setting

When you run the start command (which sets the current working directory to ./api), I get this error:

[Error: ENOENT: no such file or directory, scandir '/Users/bartkozorog/Projects/flow-interaction-template-service/dist/migrations'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/Users/bartkozorog/Projects/flow-interaction-template-service/dist/migrations'
}

This seems to be caused by this setting: MIGRATION_PATH=../dist/migrations. This should probably be MIGRATION_PATH=./dist/migrations (without .. part) instead.

  1. Invalid default TEMPLATE_DIR setting

The default glob pattern used (../templates) is also returning directories. These directory paths are then passed to fs.readFile, which doesn't seem to accept directories, given that it throws:

[Error: EISDIR: illegal operation on a directory, read] {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}

I believe the default setting here should be TEMPLATE_DIR=../templates/**/*.json, which returns all JSON files in subdirectories.

Expected Behavior

Explained above.

Steps To Reproduce

Do a clean project setup (e.g. by cloning the repo and running npm i) and try running it.

Environment

- Node: v16.7.0
- npm: 7.20.3

What are you currently working on that this is blocking?

I'm playing around with this project a bit, to see if we can extend it to support use cases mentioned here: #18 (comment)

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 a pull request may close this issue.

1 participant