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

Offline mode #93

Open
felipevyg opened this issue Sep 1, 2021 · 6 comments
Open

Offline mode #93

felipevyg opened this issue Sep 1, 2021 · 6 comments

Comments

@felipevyg
Copy link

Is there a way to use the Storage constructs with Serverless offline?
I ran the deployment so the bucket was created correctly. But if I run sls offline the bucket name comes as the string [object Object], when set in a env via: BUCKET_NAME: '${construct.someBucket.bucketName}'.

@mnapoli
Copy link
Member

mnapoli commented Sep 2, 2021

Hi, unfortunately this is a limitation of serverless-offline for all CloudFormation references (which Lift uses): dherault/serverless-offline#1149

By the way, I realized that our very own @fredericbarthelet was the one who implemented resolution of these references in sls invoke local (serverless/serverless#8198), but that is not supported by sls offline.

@zmk-punchbowl
Copy link

Just to clarify, would it be accurate to say that until dherault/serverless-offline#1149 is addressed, lift will not work with serverless-offline in general? Or does this only pertain to specific resources, such as Storage (mentioned by the OP)?

I came here because I'm trying to use an SQS (queue) construct with serverless-offline, but am getting the following error:

 Error: Constructs are already initialized: this should not happen
   at _LiftPlugin.loadConstructs (.../node_modules/serverless-lift/dist/src/plugin.js:178:13)

@mnapoli
Copy link
Member

mnapoli commented Oct 1, 2021

@zmk-punchbowl I think this is correct, I would not expect serverless-offline to work fine in several cases until dherault/serverless-offline#1149 is fixed

@zmk-punchbowl
Copy link

Thank you for confirming, @mnapoli

@bitofbreeze
Copy link
Contributor

Sorry if I misunderstand but was this plugin related to this https://www.npmjs.com/package/serverless-pseudo-parameters which seems to be built in to serverless framework now?

@zakpucci
Copy link

zakpucci commented Jul 7, 2023

Any resolution on this? Still seeing this error.

@getlift getlift deleted a comment from nativeB Nov 20, 2023
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

No branches or pull requests

5 participants