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

AWS Serverless is crashing when accessing endpoint #271

Closed
Nelrohd opened this issue Apr 21, 2019 · 7 comments
Closed

AWS Serverless is crashing when accessing endpoint #271

Nelrohd opened this issue Apr 21, 2019 · 7 comments

Comments

@Nelrohd
Copy link

Nelrohd commented Apr 21, 2019

Describe the bug

AWS serverless is not working with next-i18next.
The deployment works fine.
The code crash when accessing the endpoints:

{
  "message": "Internal server error"
}

Occurs in next-i18next version

Error from CloudWatch logs:

module initialization error: Error
at Object.fs.readdirSync (fs.js:904:18)
at getAllNamespaces (/var/task/sls-next-build/index.original.js:14188:17)
at _default (/var/task/sls-next-build/index.original.js:14200:11)
at new NextI18Next (/var/task/sls-next-build/index.original.js:17873:43)
at Object.k7Sn (/var/task/sls-next-build/index.original.js:14249:27)
at __webpack_require__ (/var/task/sls-next-build/index.original.js:23:31)
at Object.YNMu (/var/task/sls-next-build/index.original.js:11315:63)
at __webpack_require__ (/var/task/sls-next-build/index.original.js:23:31)
at Module.OSpu (/var/task/sls-next-build/index.original.js:7612:12)
at __webpack_require__ (/var/task/sls-next-build/index.original.js:23:31)

Steps to reproduce

The code I used: https://github.com/Nelinelo/nextjs-serverless
And:

sls deploy

Expected behaviour

It should not crash

@isaachinman
Copy link
Contributor

This package is not currently compatible with serverless projects. It relies upon a filesystem being present, and an Express middleware.

@Nelrohd
Copy link
Author

Nelrohd commented Apr 21, 2019

@isaachinman React-i18n suggest this package for NextJs. Then what package/solution would you suggest?

@isaachinman
Copy link
Contributor

Open to any/all sensible contributions to add serverless support. I'm not aware of any direct alternatives to this package at this time.

@Nelrohd
Copy link
Author

Nelrohd commented Apr 21, 2019

@isaachinman Then shouldn't have a ticket to support serverless to start with?

@isaachinman
Copy link
Contributor

Feel free to open one. Please remember that this is an open source project developed in our free time.

@Nelrohd
Copy link
Author

Nelrohd commented Apr 21, 2019

I understand and I didn't make any complain. My comment was just a suggestion, I apologize if you felt otherwise. Thank you for the great work and support.

@isaachinman
Copy link
Contributor

Please do open a ticket and we can look into what it would take.

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

2 participants