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-sqs incompatible with new versions of serverless-offline #116

Closed
benhili opened this issue Feb 19, 2020 · 9 comments
Closed

Comments

@benhili
Copy link

benhili commented Feb 19, 2020

When installing alongside newer versions of serverless-offline this line:

const LambdaContext = require('serverless-offline/src/LambdaContext');

fails as LambdaContext doesn't exist on that path

@thetumper
Copy link

npm warns of the version requirement during install:

npm WARN serverless-offline-sqs@3.1.3 requires a peer of serverless-offline@^5.12.1 but none is installed. You must install peer dependencies yourself.

@bakasmarius
Copy link

serverless-offline is now version 6.1.0 - any plans on supporting v6?
I'm stuck with v6.0.0-alpha.8, any newer version throws this error:
Error: Cannot find module 'serverless-offline/src/functionHelper'

This commit might be worth looking into: dherault/serverless-offline@85e0c2c

@Deliverart
Copy link

Any news on the @bakasmarius issue?
I have the same problem!

@oguimbal
Copy link

oguimbal commented Apr 2, 2020

+1

I tried to investigate... but it turns out that this is not an easy fix without any prior knowledge. serverless-offline has changed quite a bit since 6.0.0-alpha.8.

Some details: Several plugins of this repo (I use serverless-offline-sqs and serverless-offline-dynamodb-streams) are using nasty internal functions of serverless-offline to trigger lambda processing, but these functions do not exist anymore. The core model of serverles-offline has changed dramatically. The commit referenced by @bakasmarius was just moving the incriminated functions, but they have now disapeared completely.

Wokaround (kind of): Use serverless-offline@6.0.0-alpha.8 :/
nb: This version required (for me) a nasty fix in node_modules\serverless-offline-dynamodb-streams\src\index.js - I had to invert functionName and __function arguments, at line 95 & 96.

@christophersbarrett
Copy link

Has anyone brought this package up to date locally that they could potentially create a PR for? :-D :-D

@esetnik
Copy link
Contributor

esetnik commented Apr 28, 2020

@christophersbarrett I have a workaround that's working and I pushed #125. Please check it out and let me know if it's working for you.

To test it in your project the easiest way is to grab the source code and place it into your local plugins folder e.g.:

 - ./plugins/serverless-offline-sqs.js

This was referenced Apr 28, 2020
@bakasmarius
Copy link

@esetnik thanks!! I'll try to find some time this week to check your PR locally, no promises though 😬

@bakasmarius
Copy link

@esetnik I couldn't get it to work, left a comment in your PR

@AdrieanKhisbe
Copy link
Member

Handled by #129, hence closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants