nhost: Functions ignored during deploy when base directory is not repo root

I have a function that I am using as a Hasura action. Everything works as expected locally, using the CLI, however when the project deploys in the cloud the functions do not get built.

I am I doing something wrong? Or is there somewhere I can see detailed deployment logs?

Version: Nhost CLI v0.6.12 for darwin-amd64

Functions located in functions directory: 180446920-58ddde16-7d00-431f-acb0-4c77068ee470

Deploy occurs after committing to repo, but no functions were built: Screen Shot 2022-07-22 at 8 05 51 AM

No functions listed: Screen Shot 2022-07-22 at 8 06 17 AM

Server returns generic error, if I change the function name to gibberish I get the same error message returned: Screen Shot 2022-07-22 at 8 09 22 AM

It works when running locally: Screen Shot 2022-07-22 at 8 09 08 AM

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (10 by maintainers)

Most upvoted comments

@joserocha3 I found the issue, the fix is coming…

@joserocha3 thanks for reporting and sorry for this happening. The problem is that our system installs dependencies from the root dir, not from the base dir where nhost and functions are located. The fix is coming very soon…

There are two bugs in this issue, and I’ve been able to reproduce both.

1. Functions are not built when using a subdirectory

The issue is that nhost is not building functions found in a subdirectory. Migrations and metadata are picked up, but functions are not.

2. CLI doesn’t skip endpoints for _ file/folders.

I’ve created an issue here: https://github.com/nhost/cli/issues/267