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

Serverless Offline v9 support #217

Closed
C4n4rd0 opened this issue Jul 20, 2022 · 12 comments
Closed

Serverless Offline v9 support #217

C4n4rd0 opened this issue Jul 20, 2022 · 12 comments

Comments

@C4n4rd0
Copy link

C4n4rd0 commented Jul 20, 2022

Hi,

I just happen to upgrade all the versions of my dependencies to the last versions and it seems that the plugin serverless-offline-sqs does not support the last version of serverless offline. Here is the error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/debugLog' is not defined by "exports" in /Users/.../node_modules/serverless-offline/package.json at new NodeError (internal/errors.js:322:7) at throwExportsNotFound (internal/modules/esm/resolve.js:322:9) at packageExportsResolve (internal/modules/esm/resolve.js:545:3) at resolveExports (internal/modules/cjs/loader.js:450:36) at Function.Module._findPath (internal/modules/cjs/loader.js:490:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18)

Is it possible to build a new release which is compatible with the last version of serverless offline?

@zumby
Copy link

zumby commented Aug 15, 2022

@C4n4rd0 @rubenkaiser
did you guys found any alternative?
this plugin literally stops us from using SLS 9 :(

@rubenkaiser
Copy link
Contributor

@zumby
Currently there is no good solution. SLS offline simply does not export the internals since they converted the plugin to a pure esm module. In my test setup I did get it to work but that still involved removing the single "exports" line from node_modules/serverless-offline/package.json by hand and making sure your babel compiler also handles the files in this folder. In our plugin I then use a dynamic import for the lambda keeping the rest of the plugin pretty mutch the same.

@rubenkaiser
Copy link
Contributor

rubenkaiser commented Aug 16, 2022

I've just released a beta version 2.0.0-beta.0 of serverless-offline-eventBridge which should work for now. This update can be used for reference when updating the sqs plugin. The workaround can hopefully be removed when serverless offline removes the exports line so other plugins can also be updated.

@C4n4rd0
Copy link
Author

C4n4rd0 commented Aug 16, 2022

@zumby I found no alternative. I had to resign myself to not upgrade to v9. So I chose to stick to the version 8.8.1 of serverless offline until there is proper way to do.

@C4n4rd0
Copy link
Author

C4n4rd0 commented Aug 16, 2022

@rubenkaiser Just for my understanding, as we are talking about serverless-offline-sqs, why did you release a version of serverless-offline-eventBridge?

@rubenkaiser
Copy link
Contributor

@C4n4rd0 I mentioned this since the update can be used as a reference for updating the sqs plugin. If I find the time I'll submit a PR in the sqs plugin repo

@rubenkaiser
Copy link
Contributor

#220

@C4n4rd0
Copy link
Author

C4n4rd0 commented Aug 17, 2022

I was about to checkout the repo and I saw you already did it. Let's wait for the approval (unless I can do it?)

@terozio
Copy link

terozio commented Oct 14, 2022

@godu any possibility of merging the PR from @rubenkaiser to fix the plugins for later serverless-offline versions. Maybe the title of issue should be updated to reflect serverless-offline 10?

@rad182
Copy link

rad182 commented Oct 26, 2022

anyone found any workaround for this?

@rubenkaiser
Copy link
Contributor

rubenkaiser commented Oct 26, 2022

    Taking quite some time so I decided to quickly (read: without testing) publish a version of the update to use for the time being:

https://www.npmjs.com/package/sls-offline-aws-sqs

Originally posted by @rubenkaiser in #220 (comment)

Note the discussion in the issue there.. I created a temporary npm package for SQS. Looks like there isn't much activity here..

@godu
Copy link
Contributor

godu commented Oct 27, 2022

Hi, I published the support for serverless-offline ^10 || ^11.
I think I can close this issue.

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

6 participants