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

[Bug] pnpm run dev logs a lot of errors #252

Open
ripatel-fd opened this issue Jun 2, 2023 · 1 comment
Open

[Bug] pnpm run dev logs a lot of errors #252

ripatel-fd opened this issue Jun 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ripatel-fd
Copy link

Describe the bug

System (RHEL 8)

[explorer]$ node --version
v18.14.2
[explorer]$ pnpm --version
8.6.0
Install log
[explorer]$ pnpm i
 WARN  deprecated @metaplex/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
 WARN  deprecated @metaplex-foundation/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
 WARN  deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
Packages: +838
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Packages are cloned from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/ripatel/.local/share/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 845, reused 837, downloaded 0, added 838, done

dependencies:
+ @blockworks-foundation/mango-client 3.6.7
+ @bonfida/spl-name-service 0.1.30
+ @cloudflare/stream-react 1.2.0
+ @metamask/jazzicon 2.0.0
+ @metaplex-foundation/mpl-token-metadata 1.1.0
+ @metaplex/js 4.12.0 deprecated
+ @project-serum/anchor 0.23.0
+ @project-serum/serum 0.13.61
+ @react-hook/debounce 4.0.0
+ @react-hook/previous 1.0.1
+ @sentry/nextjs 7.51.0
+ @sentry/react 7.51.0
+ @solana/buffer-layout 3.0.0
+ @solana/spl-account-compression 0.1.8
+ @solana/spl-token 0.1.8
+ @solana/spl-token-registry 0.2.3736
+ @solana/web3.js 1.66.0
+ @types/bn.js 5.1.0
+ axios 0.27.2
+ bignumber.js 9.0.2
+ bn.js 5.2.1
+ bs58 4.0.1
+ chart.js 4.3.0
+ classnames 2.3.1
+ cross-fetch 3.1.5
+ eslint 8.39.0
+ eslint-config-next 13.4.0
+ humanize-duration-ts 2.1.1
+ moment 2.29.4
+ next 13.4.0
+ p-limit 3.1.0
+ react 18.2.0
+ react-chartjs-2 5.2.0
+ react-content-loader 6.1.0
+ react-countup 6.4.0
+ react-dom 18.2.0
+ react-feather 2.0.10
+ react-json-view 1.21.3
+ react-moment 1.1.3
+ react-select 4.3.1
+ superstruct 0.15.3
+ swr 1.3.0
+ tweetnacl 1.0.3
+ typescript 5.0.4
+ use-async-effect 2.2.7
+ use-tab-visibility 1.0.9

devDependencies:
+ @solana/eslint-config-solana 1.0.1
+ @solana/prettier-config-solana 0.0.2
+ @testing-library/jest-dom 5.16.4
+ @testing-library/react 14.0.0
+ @testing-library/user-event 14.4.3
+ @types/bootstrap 5.2.6
+ @types/bs58 4.0.1
+ @types/chart.js 2.9.34
+ @types/node 18.16.3
+ @types/react 18.2.0
+ @types/react-dom 18.2.1
+ @types/react-select 3.1.2
+ @types/testing-library__jest-dom 5.14.5
+ bootstrap 5.1.3
+ eslint-plugin-testing-library 5.10.3
+ jest 29.5.0
+ jest-environment-jsdom 29.5.0
+ sass 1.53.0

 WARN  Issues with peer dependencies found
.
├─┬ @bonfida/spl-name-service 0.1.30
│ ├── ✕ unmet peer @solana/buffer-layout@^4.0.0: found 3.0.0
│ └── ✕ unmet peer @solana/[email protected]: found 0.1.8
├─┬ @metaplex/js 4.12.0
│ └── ✕ unmet peer @metaplex-foundation/mpl-token-metadata@^0.0.2: found 1.1.0
├─┬ react-json-view 1.21.3
│ ├── ✕ unmet peer react@"^17.0.0 || ^16.3.0 || ^15.5.4": found 18.2.0
│ ├── ✕ unmet peer react-dom@"^17.0.0 || ^16.3.0 || ^15.5.4": found 18.2.0
│ └─┬ flux 4.0.4
│   └── ✕ unmet peer react@"^15.0.2 || ^16.0.0 || ^17.0.0": found 18.2.0
└─┬ react-select 4.3.1
  ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0": found 18.2.0
  ├── ✕ unmet peer react-dom@"^16.8.0 || ^17.0.0": found 18.2.0
  └─┬ react-input-autosize 3.0.0
    └── ✕ unmet peer react@"^16.3.0 || ^17.0.0": found 18.2.0

Done in 7.6s
pnpm run dev logs
[explorer]$ pnpm dev

> [email protected] dev /home/ripatel/explorer
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled client and server successfully in 4.6s (782 modules)
wait  - compiling...
event - compiled client and server successfully in 537 ms (782 modules)
wait  - compiling /not-found (client and server)...
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/[email protected]/node_modules/cross-fetch/dist/node-ponyfill.js
./app/providers/stats/SolanaPingProvider.tsx
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/react-dom/package.json
    at new NodeError (node:internal/errors:399:5)
    at exportsNotFound (node:internal/modules/esm/resolve:361:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
    at resolveExports (node:internal/modules/cjs/loader:565:36)
    at Module._findPath (node:internal/modules/cjs/loader:634:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
    at /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/require-hook.js:180:36
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/app-render/app-render.js:944:37
    at /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/lib/trace/tracer.js:155:62
    at /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/lib/trace/tracer.js:113:36
    at NoopContextManager.with (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
    at ContextAPI.with (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
    at NoopTracer.startActiveSpan (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18086)
    at ProxyTracer.startActiveSpan (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18847)
    at /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/lib/trace/tracer.js:102:107
    at NoopContextManager.with (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
    at ContextAPI.with (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
    at NextTracerImpl.trace (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/lib/trace/tracer.js:102:32)
    at /home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/lib/trace/tracer.js:155:31
    at wrappedRender (/home/ripatel/explorer/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/server/app-render/app-render.js:995:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/[email protected]/node_modules/cross-fetch/dist/node-ponyfill.js
./app/providers/stats/SolanaPingProvider.tsx
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 3.9s (1631 modules)
warn  - Fast Refresh had to perform a full reload due to a runtime error.
wait  - compiling /page (client and server)...
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@solana/web3.js/lib/index.cjs.js
./app/components/SearchBar.tsx

warn  - metadata.metadataBase is not set for resolving social open graph or twitter images, fallbacks to "http://localhost:3000". See https://beta.nextjs.org/docs/api-reference/metadata#metadatabase

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@solana/web3.js/lib/index.cjs.js
./app/components/SearchBar.tsx
wait  - compiling /favicon.ico/route (client and server)...
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@solana/web3.js/lib/index.cjs.js
./app/components/SearchBar.tsx
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@solana/web3.js/lib/index.cjs.js
./app/components/SearchBar.tsx
wait  - compiling /apple-icon.png/route (client and server)...
warn  - ./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/crypto-hash/index.js
./node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]._fcrremxmxlhtc5vafxgeq27db4/node_modules/@metaplex/js/lib/index.cjs.js
./app/providers/accounts/index.tsx

./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/home/ripatel/explorer/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js
./node_modules/.pnpm/@[email protected]/node_modules/@solana/web3.js/lib/index.cjs.js
./app/components/SearchBar.tsx

pnpm run dev still seems to somewhat work, though

To Reproduce
Steps to reproduce the behavior:

  1. Check out new repo
  2. pnpm i
  3. pnpm dev
@ripatel-fd ripatel-fd added the bug Something isn't working label Jun 2, 2023
@steveluscher
Copy link
Collaborator

Oh 100%. The logs are full of this stuff.

The context is that we rescued Explorer from the dead, and it's a miracle that there are only this many rogue logs.

The site used to be based on a many-times-over-deprecated version of Create React App. This year we modernized it all the way to the newest Next.js with the App Router infra. At each step of the process I made sure to lock the version of each dependency so as no to introduce too much change at once. Now that we are on a (new) stable foundation, we can start eliminating and/or updating those dependencies to eliminate the kind of build warnings that you're seeing here.

I appreciate that this makes the logs messy, but would like to close this on the basis that – as you've said – everything seems to somewhat work, though.

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
None yet
Development

No branches or pull requests

3 participants