Skip to content

[TRI-861] Next.js warning - Module not found: Can't resolve encoding #245

@ericallam

Description

@ericallam

Using the @trigger.dev/sdk in a Next.js project produces the following warning:

- warn ./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/eric/code/triggerdotdev/trigger.dev-examples/latest-packages/node_modules/node-fetch/lib'

It turns out this is a pretty widely experienced warning that doesn't actually effect anything in Next.js. See this supabase-js issue:

supabase/supabase-js#612

encoding is an optional dependency of node-fetch and so there is no issue with it missing.

If you would like to get rid of this warning, just run:

npm add encoding -D

To add the encoding dependency to your dev deps. Of course this won't stop this warning from appearing from production builds, so you can also do:

npm add encoding

TRI-861

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions