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

[BUG] Module not found: can't resolve 'encoding' #355

Open
ianschmitz opened this issue Oct 10, 2023 · 2 comments
Open

[BUG] Module not found: can't resolve 'encoding' #355

ianschmitz opened this issue Oct 10, 2023 · 2 comments
Labels
Bug Something isn't working 📦 inngest Affects the `inngest` package

Comments

@ianschmitz
Copy link

ianschmitz commented Oct 10, 2023

Describe the bug
I see this warning when integrating Inngest into a new Next.js project:

 ⚠ ./node_modules/cross-fetch/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/ian/Code/promptmetrix/node_modules/cross-fetch/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/cross-fetch/node_modules/node-fetch/lib/index.js
./node_modules/cross-fetch/dist/node-ponyfill.js
./node_modules/inngest/helpers/env.js
./node_modules/inngest/components/InngestCommHandler.js
./node_modules/inngest/next.js
./src/app/api/inngest/route.ts

Supabase had the same warning in the past. See the following issue: supabase/supabase-js#612

To Reproduce
Steps to reproduce the behavior:

  1. Follow instructions on https://www.inngest.com/docs/quick-start for the "App Router" variant.

Expected behavior
No warnings.

Code snippets / Logs / Screenshots

System info (please complete the following information):

  • OS: macOS
  • npm package Version: 3.1.1
  • Framework: Next.js
  • Platform: N/A
@ianschmitz ianschmitz added the Bug Something isn't working label Oct 10, 2023
@jaaneh
Copy link

jaaneh commented Oct 22, 2023

Also seeing this same issue with Next.js v13.5.6 app router.

Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/cross-fetch/dist/node-ponyfill.js
./node_modules/inngest/helpers/env.js
./node_modules/inngest/components/InngestCommHandler.js
./node_modules/inngest/next.js
./src/app/api/inngest/route.ts

For now, I've installed encoding manually with yarn add -D encoding to get around the issue.

@jpwilliams jpwilliams added the 📦 inngest Affects the `inngest` package label Nov 17, 2023
@beefancohen
Copy link

also seeing this with same setup ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working 📦 inngest Affects the `inngest` package
Projects
None yet
Development

No branches or pull requests

4 participants