demo-apps
demo-apps copied to clipboard
Cannot run server locally because of missing dependencies
Hello everyone,
I tried to run your code on my local environment. I work with a Windows machine with VS Code installed.
moe@LAPTOP:~/demo-apps/nextjs_moralis_nft_gating$ yarn dev
yarn run v1.22.15
warning package.json: No license field
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/moe/demo-apps/nextjs_moralis_nft_gating/.env.local
error - ./node_modules/@wagmi/connectors/dist/chunk-3AFMPFBA.js:22:0
Module not found: Package path ./lib/utils.js is not exported from package /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers (see exports field in /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers/package.json)
Import trace for requested module:
./node_modules/@wagmi/connectors/dist/injected.js
./node_modules/@wagmi/core/dist/chunk-BVC4KGLQ.js
./node_modules/@wagmi/core/dist/internal/index.js
./node_modules/wagmi/dist/index.js
./pages/_app.jsx
https://nextjs.org/docs/messages/module-not-found
wait - compiling...
error - ./node_modules/@wagmi/connectors/dist/chunk-3AFMPFBA.js:22:0
Module not found: Package path ./lib/utils.js is not exported from package /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers (see exports field in /home/moe/demo-apps/nextjs_moralis_nft_gating/node_modules/ethers/package.json)
Import trace for requested module:
./node_modules/@wagmi/connectors/dist/injected.js
./node_modules/@wagmi/core/dist/chunk-BVC4KGLQ.js
./node_modules/@wagmi/core/dist/index.js
./node_modules/wagmi/dist/index.js
./pages/_app.jsx
https://nextjs.org/docs/messages/module-not-found`
I already tried to install the necessary components with the yarn add all command, but it gives me many warnings:
yarn add v1.22.15
warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info @next/[email protected]: The CPU architecture "x64" is incompatible with this module.
info @next/[email protected]: The platform "linux" is incompatible with this module.
info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
warning [email protected]: The engine "pnpm" appears to be invalid.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "ethers@>=5.5.1 <6".
warning "wagmi > @wagmi/[email protected]" has incorrect peer dependency "ethers@>=5.5.1 <6".
warning "wagmi > [email protected]" has incorrect peer dependency "typescript@>=4.9.4".
warning "wagmi > @wagmi/core > @wagmi/[email protected]" has incorrect peer dependency "ethers@>=5.5.1 <6".
[4/4] Building fresh packages...
success Saved lockfile.
warning [email protected]: No license field
success Saved 13 new dependencies.
info Direct dependencies
├─ @moralisweb3/[email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @moralisweb3/[email protected]
├─ @moralisweb3/[email protected]
├─ @moralisweb3/[email protected]
├─ @panva/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 14.64s.
`
Did some of you also face the same problem on Windows and if yes, how did you handle this error?
Thanks in advance for your help.