-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
TypeError: require is not a function when importing an npm module in a file within the api
folder
#7933
Comments
Did you install 9.0.1? |
Hi @timneutkens, I upgraded to 9.0.1 and I still get The error only happens on a deployed site. |
Getting the same error for a normal page component. |
This is a duplicate of #7758 now -- you're looking for a file that's no longer available. |
Let's close this in favor of #7758 then. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
When deployed I get a TypeError: require is not a function error when importing npm module in api/allMovies.js. It works locally but not when deployed.
To Reproduce
yarn
yarn start
Internal Server Error
Expected behavior
On prod site, movies should be fetched and appear on screen on initial load
Additional context
Related to #7850
Thank you
The text was updated successfully, but these errors were encountered: