Open RichiCoder1 opened 5 years ago
I (partially) figured it out. If deploymentBucket
is set, createStack
doesn't actually, well, create the initial stack. Not sure how to fix this.
Looks like the issue arises because the checking of the bucket happens before the stack is update. The offending code is here https://github.com/danielcondemarin/serverless-nextjs-plugin/blob/fcd19e026d5c9fc098be79986142f9108732bf6c/packages/serverless-nextjs-plugin/index.js#L29 and you can see the order in which hooks are run here https://gist.github.com/HyperBrain/50d38027a8f57778d5b0f135d80ea406.
I believe if the bucket is created as part of the first sls deploy
then createStack
will create the bucket and not cause an issue, but if you run sls deploy
first then add the bucket later the check will fail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Howdy! I'm using the
assetPrefix
option to let the plugin deploy the assets bucket. However, even afterserverless remove
with no pre-existing stack whatsoever, I guess this error:I'm very confused too as I thought
serverless-nextjs-plugin
handled this? And it seems like this check is hapenning before serverless actually has a change to deploy the cloudformation stack that creates bucket for the first time?