Module not found: Can't resolve 'encoding' in '/vercel/path0/node_modules/cross-fetch/node_modules/node-fetch/lib'
Asked Answered
R

1

22

Has anyone come across this non-breaking warning issue that you get with the npm package: @supabase/supabase-js

The warning message:

warn  - ./node_modules/cross-fetch/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/maxsilva/Sites/kamapay/sasa-frontend/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/@supabase/supabase-js/dist/main/lib/fetch.js
./node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js
./node_modules/@supabase/supabase-js/dist/main/index.js
./lib/supabaseClient.js
./app/[lng]/page.jsx
Reprieve answered 15/3, 2023 at 17:39 Comment(1)
Does this answer your question? Can't Resolve "encoding" Module Error While Using Nextjs-13 + SupabaseBulbous
W
33

As stated in the comment, you'll need to run this:

Vanilla NPM:

npm add -D encoding

PNPM:

pnpm add -D encoding 
Worst answered 24/4, 2023 at 13:8 Comment(2)
is it a bug, i am sure this error comes from some irregular code use . can you describe this error .Jaye
How exactly does this work ? I didn't need to install encoding before. Why all of a sudden ?Stupidity

© 2022 - 2024 — McMap. All rights reserved.