inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
431 stars 40 forks source link

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

Open ianschmitz opened 1 year ago

ianschmitz commented 1 year ago

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: https://github.com/supabase/supabase-js/issues/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):

jaaneh commented 1 year ago

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.

beefancohen commented 2 months ago

also seeing this with same setup ^