Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Can't resolve 'encoding' in '...pnpm/node-fetch@2.6.9/node_modules/node-fetch/lib' #1080

Open
3 tasks done
padi-g opened this issue Mar 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@padi-g
Copy link

padi-g commented Mar 11, 2023

Prerequisites

  • I'm using the latest version of near-api-js.
  • I have tried to start with a fresh project and reproduce the defect with minimal code changes.
  • I have read the console error messages carefully (if applicable).

Description

Hey all, this is causing a build error when deploying to vercel -

warn  - ./node_modules/.pnpm/node-fetch@2.6.9/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/Users/gp/Work/padiyar.xyz/node_modules/.pnpm/node-fetch@2.6.9/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/node-fetch@2.6.9/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/near-api-js@1.1.0/node_modules/near-api-js/lib/utils/setup-node-fetch.js
./node_modules/.pnpm/near-api-js@1.1.0/node_modules/near-api-js/lib/connect.js
./node_modules/.pnpm/near-api-js@1.1.0/node_modules/near-api-js/lib/index.js
./app/protected/page.tsx

Reproducible demo

No response

Steps to reproduce

Followed the wallet selector example to build a next js app

Expected behavior

For 'encoding' to get resolved

Actual behavior

Throwing an error related to near-api-js

Your environment

  • NEAR JavaScript API version used: 1.1.0
  • Frontend framework (if applicable): Next.js
  • Relevant dependencies (if applicable): ./node_modules/.pnpm/node-fetch@2.6.9/node_modules/node-fetch/lib/index.js
@padi-g padi-g added the bug Something isn't working label Mar 11, 2023
@github-project-automation github-project-automation bot moved this to Backlog 🥶 in DevRel May 30, 2024
@thisisjoshford thisisjoshford removed this from DevRel Oct 31, 2024
@github-project-automation github-project-automation bot moved this to NEW❗ in DevTools Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: NEW❗
Development

No branches or pull requests

1 participant