scope
scope copied to clipboard
Invoked setup function throws "Cannot find module 'sync-request'"
Tried to run sls invoke -f setup which threw this error despite having all the dependencies installed.

In the backend folder
Run npm I sync-request again
It looks like that package is not in your nose modules or it is corrupted
Then deploy it again
- David Wells
On Mar 11, 2017, at 5:13 AM, Arvind Naidu [email protected] wrote:
Tried to run sls invoke -f setup which threw this error despite having all the dependencies installed.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
That was the first thing I did after cloning the repository as you can see below.

Ran npm i sync-request again just like you asked and redeployed but the error still persists.

Also updated my node and npm to the latest version just to eliminate that possibility.
I'm having the same error, tried updating package.json to sync-request ^4.0.0, did not fix the problem.
Inside this folder https://github.com/serverless/scope/tree/master/backend make sure you run npm install then check the backend/node_modules folder for the sync-request module
Thank you, I tried that same error. Nevertheless, very nice tutorial, thanks for your time.
@mgd216 do you have the sync-request module in your backend/node_modules folder?
If so, run sls deploy inside the backend folder to redeploy the service
I was just getting the same error, had to match the node version in the serverless.yml file.