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

Cannot find module 'api'\nRequire stack #624

Open
manikandan10ardhas opened this issue Oct 3, 2021 · 1 comment
Open

Cannot find module 'api'\nRequire stack #624

manikandan10ardhas opened this issue Oct 3, 2021 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@manikandan10ardhas
Copy link

I have uploaded the serverless lambda function code.

While try to run API endpoint its return the error.

"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'api'\nRequire stack:\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js

Find the project structure. How to solve this issue?

image

@pgrzesik
Copy link
Contributor

pgrzesik commented Oct 4, 2021

Hello @manikandan10ardhas, it looks like an issue with your specific configuration. I've also noticed sam-local - are you using SAM or Serverless Framework?

@medikoo medikoo added the question Further information is requested label Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants