Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 212
Max Silva Avatar asked Nov 17 '25 03:11

Max Silva


1 Answers

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

Vanilla NPM:

npm add -D encoding

PNPM:

pnpm add -D encoding 
like image 90
Mansueli Avatar answered Nov 18 '25 20:11

Mansueli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!