I'm now using a monorepo and have set the base directory option setting within nhost. However, a deployment isn't being triggered whenever I push to this branch. My folder structure is: - root ---- apps ---- packages ---- nhost .nhost functions nhost
Last active 4 months ago
18 replies
14 views
- TA
I'm now using a monorepo and have set the base directory option setting within nhost. However, a deployment isn't being triggered whenever I push to this branch. My folder structure is:
- root
---- apps
---- packages
---- nhost
.nhost
functions
nhost
- root
- EL
Was this because of the custom base directory? Or the branch?
- EL
Nhost will trigger when there is a new push to the Deployment Branch. Once the deployment starts, Nhost will use the Base Directory.
- TA
I’m not sure.
Pushed to the deployment branch and verified that my nhost folder is in the
./nhost
directory. - TA
Is there any way I can trigger a deploy from the dashboard?
- TA
Figured it out! I had to add a package.json in the nhost folder with express
- EL
Oh right. I think you only need the package.json file without express.
- TA
Wait, I ran into another issue
- TA
11:23:28: Starting deployment 11:23:28: Cloning repo github.com/FintaApp/monorepo (#afbbf9c) 11:23:29: Applying database migrations 11:23:31: Database migrations applied successfuly 11:23:31: Applying metadata 11:23:36: Failed to apply metadata: time="2022-11-18T16:23:36Z" level=fatal msg="error applying metadata \n{\n \"code\": \"not-exists\",\n \"error\": \"event trigger \\\"on_insert_user\\\" does not exist\",\n \"path\": \"$.args\"\n}" 11:23:36: Deployment completed with status FAILED
- TA
I'm not sure what to do with
Failed to apply metadata: time="2022-11-18T16:23:36Z" level=fatal msg="error applying metadata \n{\n \"code\": \"not-exists\",\n \"error\": \"event trigger \\\"on_insert_user\\\" does not exist\",\n \"path\": \"$.args\"\n}"
It works locally
- EL
If you delete your local database (.nhost folder) and start the CLI. Do you get the same error?
- TA
No, it still works locally
- TA
Interestingly enough, I removed the
on_insert_user
event and pushed up the changes. I'm still getting the same error.Is there some sort of cache?
- EL
No, there is not. That's strange
- EL
can you pos tthe subdomain/region here or in DM?
- TA
Just sent via DM
- EL
I'll check tomorrow or Monday sorry. 8pm here
- TA
Fixed it. Turns out I needed to solve a metadata issue first before deploy.
Originally, I removed an env variable that was used in my event trigger, then pushed up a deployment.
To fix it, I re-added the env variable, forced a new deployment, and then removed the env var
Last active 4 months ago
18 replies
14 views