serverless-plugins
serverless-plugins copied to clipboard
Serverless Offline v9 support
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?
@C4n4rd0 @rubenkaiser did you guys found any alternative? this plugin literally stops us from using SLS 9 :(
@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.
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.
@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.
@rubenkaiser Just for my understanding, as we are talking about serverless-offline-sqs, why did you release a version of serverless-offline-eventBridge?
@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
https://github.com/CoorpAcademy/serverless-plugins/pull/220
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?)
@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?
anyone found any workaround for this?
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 https://github.com/CoorpAcademy/serverless-plugins/issues/220#issuecomment-1271335615
Note the discussion in the issue there.. I created a temporary npm package for SQS. Looks like there isn't much activity here..
Hi, I published the support for serverless-offline ^10 || ^11
.
I think I can close this issue.