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

TypeError: require is not a function when importing npm module in api/movies.js #7850

Closed
jeremytenjo opened this issue Jul 9, 2019 · 4 comments · Fixed by #7898
Closed
Milestone

Comments

@jeremytenjo
Copy link

jeremytenjo commented Jul 9, 2019

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

A clear and concise description of what the bug is.

Expected behavior

Expecint not to get a TypeError: require is not a function error

Screenshots

Screen Shot 2019-07-09 at 1 12 09 PM
Screen Shot 2019-07-09 at 1 11 44 PM
Screen Shot 2019-07-09 at 1 14 34 PM

Thank you

@timneutkens
Copy link
Member

timneutkens commented Jul 9, 2019

Please provide a full reproduction so that we can have a look.

@Timer Timer added this to the 9.0.1 milestone Jul 10, 2019
@huv1k
Copy link
Contributor

huv1k commented Jul 11, 2019

Hey @tenjojeremy, could you please provide full reproduction with repository? It would help us to fix your issue.

@jeremytenjo
Copy link
Author

jeremytenjo commented Jul 11, 2019

Hi @huv1k @timneutkens

Sorry for the delayed response.

Steps:

  1. clone https://github.com/tenjojeremy/test-nextjs-simple
  2. run yarn
  3. run yarn start
  4. open localhost: 3000
  5. You should see movie posters as expected
  6. Deploy site
  7. open deployed site url
  8. you will see Internal Server Error
  9. logs will show error log:

Screen Shot 2019-07-11 at 10 31 52 AM

Thank you

@balazsorban44
Copy link
Member

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.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants