Closed thorwebdev closed 7 months ago
I'm seeing the same issue.
Module not found: Can't resolve 'encoding' in '/Users/cdedreuille/Sites/kapture/node_modules/node-fetch/lib'
Import trace for requested module:
./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/supabase.ts
./app/app/page.tsx
./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/cdedreuille/Sites/kapture/node_modules/node-fetch/lib'
Import trace for requested module:
./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/supabase.ts
./app/app/components/image.tsx
./app/app/components/grid.tsx
Everything is working as expected but it would be great to make it go away.
Yes, am getting the same with the latest Nextjs 13.1.6. Everything works though.
I am using node 18+ version, It does not need cross-fetch
.
pnpm add -D encoding
With this you can run.
Any update on this one @thorwebdev ?
@cdedreuille no update so far, but I'll take a look this week.
As @kamto7 suggested, using npm:
npm i -D encoding
Removes the error. I'm going to test a deployment on Vercel later this week to see if i'm able to deploy successfully.
@robbiecren07 Did you get around to trying it?
I just freshly installed it locally and have it running locally, but I still seem to be getting this Error
Yup I forgot to reply, I was able to deploy with no issues after running the above command in terminal.
Might be good if someone opens a PR to add this Library as a Dependency.
Unless someone else wants to do this, I'm probably gonna open one soon-ish
whwn i use npm i -D encoding everything is working .
whwn i use npm i -D encoding everything is working .
It's amazing how at the same time the error is old but is so current
Facing the same issue with next 13.4.3
Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/cross-fetch/dist/node-ponyfill.js
./node_modules/@supabase/storage-js/dist/main/lib/helpers.js
./node_modules/@supabase/storage-js/dist/main/packages/StorageFileApi.js
./node_modules/@supabase/storage-js/dist/main/StorageClient.js
./node_modules/@supabase/storage-js/dist/main/index.js
./lib/supabase-storage.js
./app/api/upload/route.ts
same issue on next next@13.4.9
with turbo turbo@1.10.7
npm i -D encoding
seems like a good workaround for now 🚀
Same issue, but for use with Firebase. On next@13.4.9
and node v18.16.1
. npm i -D encoding
has removed the error.
I am having the same error message with Nextjs semver 13.4.1. However, no issues deploying, and everything works as intended in production.
What gives?
Ran into this as well, looking forward to the fix. Thank folks!
@thorwebdev @soedirgo Any update on this one?
Still happening on Next 13.4.15
For me, I am using the same version (Next.js 13.4.15) and npm i -D encoding
is working.
Using Next.JS 13.4.16 and can confirm that pnpm add -D encoding
resolved this error.
Hey all, we're still looking into a solution that doesn't require npm i -D encoding
.
Hey, I still have this error on Next 13.4.19. I can confirm that adding encoding with pnpm add -D encoding
works, but it is not an ideal solution.
i switched to pnpm, this solved it
Looks like this will be resolved soon? @soedirgo I have an active project im working on with:
"@supabase/auth-helpers-nextjs": "^0.7.4",
"@supabase/supabase-js": "^2.32.0",
"next": "13.4.19",
"react": "18.2.0",
So I can test, once released.
Hey all, can you check if the errors are still there after upgrading supabase-js to v2.33.2?
p.s. Please also try to uninstall encoding
if you had to install that as a workaround. Thanks!
This seems to have fixed the issue in my case!
Fixed it for me as well! (with encoding not installed)
Hey all, can you check if the errors are still there after upgrading supabase-js to v2.33.2?
p.s. Please also try to uninstall
encoding
if you had to install that as a workaround. Thanks!
Confirmed
Hey all, can you check if the errors are still there after upgrading supabase-js to v2.33.2?
p.s. Please also try to uninstall
encoding
if you had to install that as a workaround. Thanks!
This sorted out the issue! Appreciated!
I am using node 18+ version, It does not need
cross-fetch
.npm add -D encoding
With this you can run. and prob solved.
Module not found: Can't resolve 'encoding' in '/Users/thorwebdev/Documents/code/supabase/quickstarts/supabase-next-13/node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/lib'
This warning is printed when using supabase-js in nextjs 13 project: https://github.com/supabase/auth-helpers/issues/340
It's related to an old version of node-fetch being used in cross-fetch: https://github.com/node-fetch/node-fetch/issues/412 https://github.com/lquixada/cross-fetch/issues/146
It should be safe to ignore as it's an optional dependency in node-fetch, but might be worthwhile to see if we can get rid of the warning.