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

./startServer -> Error: Cannot find module 'http-proxy' #7

Open
StErMi opened this issue May 15, 2020 · 5 comments
Open

./startServer -> Error: Cannot find module 'http-proxy' #7

StErMi opened this issue May 15, 2020 · 5 comments

Comments

@StErMi
Copy link

StErMi commented May 15, 2020

I've just done a fresh install with npm install and tried to launch the local server with the ./startServer but I got this error:

$ ./startServer 
internal/modules/cjs/loader.js:613
    throw err;
    ^

Error: Cannot find module 'http-proxy'
Require stack:
- C:\Users\stermi\dev\workspace_serverless\serverless-stack-demo-ext-api\startServer      
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
    at Function.Module._load (internal/modules/cjs/loader.js:526:27)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (C:\Users\stermi\dev\workspace_serverless\serverless-stack-demo-ext-api\startServer:5:19)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)

how can I fix it?

@jayair
Copy link
Member

jayair commented May 17, 2020

Hmm it looks like it's missing in the package.json. I think it should be a dev dependency. Can you try it and submit a PR?

@StErMi
Copy link
Author

StErMi commented May 18, 2020

@jayair sorry, I didn't update the GitHub issue. After installing the dev dependency I get this error:

$ ./startServer 
events.js:173
      throw er; // Unhandled 'error' event
      ^

Error: spawn serverless ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:19)
    at onErrorNT (internal/child_process.js:431:16)
    at processTicksAndRejections (internal/process/task_queues.js:83:17)
    at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:58:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:828:11)
    at internal/main/run_main_module.js:17:11
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
    at onErrorNT (internal/child_process.js:431:16)
    [... lines matching original stack trace ...]
    at internal/main/run_main_module.js:17:11

as soon as I figured out how to fix it I will make a PR.

This is my current sls version on Windows 10

$ sls -v
Framework Core: 1.71.1
Plugin: 3.6.12
SDK: 2.3.0
Components: 2.30.10

@AlexSun98
Copy link

AlexSun98 commented Aug 21, 2020

any update pls? @StErMi @jayair

is there an instruction of how to do a local debugging via serverless-offine for this project?

@StErMi
Copy link
Author

StErMi commented Sep 3, 2020

not at the moment :(

@jayair
Copy link
Member

jayair commented Sep 7, 2020

@AlexSun98 You should be able to use serverless-offline as is but the startServer script is just for convenience to run all the services together.

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

3 participants