Back

Import trace error

  • 0
  • Web
stasyn1410
18 Oct, 2023, 19:24

Today i started build my first app with appwrite ❀️

and i working with tutorial on apwrite.io but my console is logging:

TypeScript
./node_modules/node-fetch/lib/index.js
./node_modules/cross-fetch/dist/node-ponyfill.js
./node_modules/appwrite/dist/esm/sdk.js
./src/lib/context/user.tsx
 ⚠ ./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/sta/WebstormProjects/appwrite-project/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/appwrite/dist/esm/sdk.js
./src/lib/context/user.tsx```
TL;DR
The user is encountering an import trace error when working with the Appwrite tutorial. The error is related to a missing 'encoding' package in the '/node-fetch/lib' directory. The solution is to install the 'encoding' package.
Drake
18 Oct, 2023, 19:38

Install the encoding package

stasyn1410
18 Oct, 2023, 19:41

oh, It really works. Thank you. But it's not mentioned anywhere.

Drake
18 Oct, 2023, 19:46

ya...are you using nextjs?

stasyn1410
18 Oct, 2023, 19:47

yes

Drake
18 Oct, 2023, 19:47

im pretty sure i've only seen this with nextjs...and when executed in the edge runtime

Drake
18 Oct, 2023, 19:47

i hate nextjs 😜

stasyn1410
18 Oct, 2023, 20:07

I noticed πŸ˜… You only have documentation for pure React

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more