-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Deployment on AWS: TypeError: Cannot read property '$create' of undefined #385
Comments
Related to: milliHQ/terraform-aws-next-js#239 |
Hey @jatidevelopments, I'm not sure if we've had anyone use this module with Blitz yet. In order for Blitz auth to work correctly, we need the Probably the terraform module needs updated to read that file if it detects Blitz. |
Would agree that this is not an issue with Blitz but with the Terraform module. We are in the process of removing the wrapper, so this should be resolved soon. |
Ok, then a workaround that probably would work is use |
Hi @flybayer thanks for the support! I patched the tf-next package with
I think I need to change |
Hi @ofhouse, could you tell me how long it will take to publish the new version? I need to get it work by next week. |
Quick explainer here: The "module" consists of two parts:
The CLI creates a package from your Blitz / Next.js source that is consumable by AWS Lambda. So Terraform only deploys static files generated by the CLI, but does not modify or build any of the Blitz or Next source code. Not a big fan of giving ETAs on my Open Source projects since my estimates for update plans were mostly mixed up by my (paid) work in the past 😅 |
Hmm... Yeah I already thought that the CLI is responsible for building the Lambda Functions. That's why I was confused why changing the Would be great if you could fix it over the weekend. I would maybe give a bug bounty reward if this helps for your motivation ;) Other than that if you know a workaround for short. Then I would appreciate that too! |
Learned today that Vercel is still forcing Have you tried to deploy it on Vercel if the error is also present there? |
What is the problem?
I have successfully deployed BlitzJS to AWS. However, when I try to login or signup an account I get an Error:
Blitz.JS Deployment: TypeError: Cannot read property '$create' of undefined
I think this issue is related to #13
I don't wrap the config like in the issue in 2955, so I don't get why it's not working correctly. BlitzJS is supported with this module, right?
Maybe it has something to do with the next-tf package. I found in "terraform-aws-next-js/packages/tf-next/src/utils/index.ts" that its parsing for next.config.js not blitz.config.js. Maybe because of that blitz can not wrap around next?
Has anybody an idea how I could fix it? Would really appreciate if somebody know a solution!
Paste all your error logs here:
Paste all relevant code snippets here:
What are detailed steps to reproduce this?
yarn tf-next
terraform apply
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
terrafrom destroy
, deleted .tf-next then build again withyarn tf-next
and deployed again withterraform apply
.The text was updated successfully, but these errors were encountered: