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

Node v14 support #34

Closed
matthewlilley opened this issue Mar 31, 2022 · 53 comments
Closed

Node v14 support #34

matthewlilley opened this issue Mar 31, 2022 · 53 comments
Assignees
Labels
bug Something isn't working dependencies

Comments

@matthewlilley
Copy link

matthewlilley commented Mar 31, 2022

It seems that we're locked into depedencies which will only work on Node v16. Unfortuantely even AWS isn't supporting v16 yet which means we're blocked from using this. I have done some trial and error to find v14 compatbile options, but unable to find any compatible combination so far.

@matthewlilley
Copy link
Author

`../../node_modules/.pnpm/[email protected]/node_modules/fast-json-stringify/index.js
Module not found: Can't resolve 'long' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/fast-json-stringify'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/graphql-jit/dist/execution.js
../../node_modules/.pnpm/[email protected]/node_modules/graphql-jit/dist/index.js
../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/utils/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/[email protected]/node_modules/fast-json-stringify/index.js
Module not found: Can't resolve 'uglify-es' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/fast-json-stringify'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/graphql-jit/dist/execution.js
../../node_modules/.pnpm/[email protected]/node_modules/graphql-jit/dist/index.js
../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/utils/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/[email protected]/node_modules/fast-json-stringify/index.js
Module not found: Can't resolve 'uglify-es/package.json' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/fast-json-stringify'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/graphql-jit/dist/execution.js
../../node_modules/.pnpm/[email protected]/node_modules/graphql-jit/dist/index.js
../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/utils/index.mjs
./.graphclient/index.ts
./pages/index.tsx

./.graphclient/index.ts
Attempted import error: 'gql' is not exported from '@graphql-mesh/utils' (imported as 'gql').

Import trace for requested module:
./pages/index.tsx

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

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/cross-undici-fetch/dist/node-ponyfill.js
../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/utils/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/buffer-util.js
Module not found: Can't resolve 'bufferutil' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/ws/lib'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/websocket.js
../../node_modules/.pnpm/[email protected]/node_modules/ws/index.js
../../node_modules/.pnpm/[email protected]/node_modules/subscriptions-transport-ws/dist/server.js
../../node_modules/.pnpm/[email protected]/node_modules/subscriptions-transport-ws/dist/index.js
../../node_modules/.pnpm/@graphql-tools+url-loader@7.9.7_@types[email protected]/node_modules/@graphql-tools/url-loader/index.mjs
../../node_modules/.pnpm/@graphql-mesh+graphql@0.23.0_@types[email protected]/node_modules/@graphql-mesh/graphql/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/validation.js
Module not found: Can't resolve 'utf-8-validate' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/ws/lib'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/receiver.js
../../node_modules/.pnpm/[email protected]/node_modules/ws/index.js
../../node_modules/.pnpm/[email protected]/node_modules/subscriptions-transport-ws/dist/server.js
../../node_modules/.pnpm/[email protected]/node_modules/subscriptions-transport-ws/dist/index.js
../../node_modules/.pnpm/@graphql-tools+url-loader@7.9.7_@types[email protected]/node_modules/@graphql-tools/url-loader/index.mjs
../../node_modules/.pnpm/@graphql-mesh+graphql@0.23.0_@types[email protected]/node_modules/@graphql-mesh/graphql/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/buffer-util.js
Module not found: Can't resolve 'bufferutil' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/ws/lib'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/websocket.js
../../node_modules/.pnpm/[email protected]/node_modules/ws/index.js
../../node_modules/.pnpm/[email protected][email protected]/node_modules/isomorphic-ws/node.js
../../node_modules/.pnpm/@graphql-tools+url-loader@7.9.7_@types[email protected]/node_modules/@graphql-tools/url-loader/index.mjs
../../node_modules/.pnpm/@graphql-mesh+graphql@0.23.0_@types[email protected]/node_modules/@graphql-mesh/graphql/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/validation.js
Module not found: Can't resolve 'utf-8-validate' in '/home/feedme/interface/node_modules/.pnpm/[email protected]/node_modules/ws/lib'

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/ws/lib/receiver.js
../../node_modules/.pnpm/[email protected]/node_modules/ws/index.js
../../node_modules/.pnpm/[email protected][email protected]/node_modules/isomorphic-ws/node.js
../../node_modules/.pnpm/@graphql-tools+url-loader@7.9.7_@types[email protected]/node_modules/@graphql-tools/url-loader/index.mjs
../../node_modules/.pnpm/@graphql-mesh+graphql@0.23.0_@types[email protected]/node_modules/@graphql-mesh/graphql/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/utils/index.mjs
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/utils/index.mjs
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
../../node_modules/.pnpm/@[email protected]/node_modules/@graphql-mesh/runtime/index.mjs
./.graphclient/index.ts
./pages/index.tsx

../../node_modules/.pnpm/@graphql-tools+url-loader@7.9.7_@types[email protected]/node_modules/@graphql-tools/url-loader/index.mjs
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
../../node_modules/.pnpm/@graphql-mesh+graphql@0.23.0_@types[email protected]/node_modules/@graphql-mesh/graphql/index.mjs
./.graphclient/index.ts
./pages/index.tsx

Build error occurred
/home/feedme/interface/apps/analytics/.next/server/chunks/429.js:102418
resolveObjectURL ??= (webpack_require(14300).resolveObjectURL)
^^^

SyntaxError: Unexpected token '??='
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.webpack_require.f.require (/home/feedme/interface/apps/analytics/.next/server/webpack-runtime.js:237:28)
at /home/feedme/interface/apps/analytics/.next/server/webpack-runtime.js:155:40
at Array.reduce () {
type: 'SyntaxError'`

@ardatan
Copy link
Member

ardatan commented Mar 31, 2022

Actually GraphQL Tools and GraphQL Mesh have been tested on Node 12(which is lower than Node 14) and 17;
https://github.com/Urigo/graphql-mesh/blob/master/.github/workflows/tests.yml#L80
https://github.com/ardatan/graphql-tools/blob/master/.github/workflows/tests.yml#L115

I think the issue looks like something else specific for Vercel cc @dotansimha

@n1ru4l
Copy link
Contributor

n1ru4l commented Mar 31, 2022

@matthewlilley This seems to be a webpack issue. Can you verify the same happens without bundling your AWS Lambda code? (fastify/fast-json-stringify#67)

@matthewlilley
Copy link
Author

matthewlilley commented Mar 31, 2022

@n1ru4l I was able to run in Next.js development mode using both Node v14 & v16, still plenty of those errors such as

"Critical dependency: the request of a dependency is an expression" and "Module not found: Can't resolve 'utf-8-validate'"

but it still works fine in development mode

The breaking error is the "Unexpected token '??='" during a regular build

@matthewlilley
Copy link
Author

Also, production build on Node v16 is successful and works fine. Node v14 is breaking with "Unexpected token '??='"

@n1ru4l
Copy link
Contributor

n1ru4l commented Mar 31, 2022

@matthewlilley Can you give more context (e.g. a non-webpack butchered stack trace) on where that syntax error is happening? It seems like a dependency is using the Logical Assignment ??= feature, which is only supported since Node.js version 15.14.0.

@matthewlilley
Copy link
Author

matthewlilley commented Mar 31, 2022

@n1ru4l I've struggled to find the exact dependency which is the trouble maker, but whenever the codegenerated SDK is used during build time it will bail with this error. I was able to avoid the error during build by using a dynamic import, but the error is still thrown at runtime during a function invocation.

This is the branch I'm working from:

https://github.com/sushiswap/interface/tree/feature/analytics

@n1ru4l
Copy link
Contributor

n1ru4l commented Mar 31, 2022

@matthewlilley Can you please search your node_modules for usages of the ??= operator?

@matthewlilley
Copy link
Author

matthewlilley commented Mar 31, 2022

@n1ru4l I've been speaking with the Vercel team about this issue and they've said that

"Since deps are not compiled when being used server-side, this error can't be avoided unless the child deps of graphql-mesh support v14 (even in GSSP)"

I searched node modules and could find no usages of ??= operator, only in the .next output folder. 🤔

@n1ru4l
Copy link
Contributor

n1ru4l commented Mar 31, 2022

Does the occurence within the .next folder give some hint from where it originates? Maybe you can disable minification?

@matthewlilley
Copy link
Author

Screenshot_682

@n1ru4l
Copy link
Contributor

n1ru4l commented Mar 31, 2022

@matthewlilley
Copy link
Author

@n1ru4l "It's a child dep of @graphql-mesh/types"

@n1ru4l
Copy link
Contributor

n1ru4l commented Mar 31, 2022

I created nodejs/undici#1318

@matthewlilley
Copy link
Author

@n1ru4l Legend. Thanks for sticking with me on this one 👊

@dotansimha
Copy link
Collaborator

Merged in undici repo, waiting for a release, then we'll update and cut a release here as well.

@ardatan
Copy link
Member

ardatan commented Apr 13, 2022

I don't think this issue happens on a regular NodeJS v14 project because undici isn't called on Node 14. So there is bundler or sth here and if there is bundler, it should be fairly easy to transpile the code to a specific Node version.

@dotansimha
Copy link
Collaborator

Hi there! With the recent upgrades in graph-client internals, we can see that running it on node14 works fine :)
Please try @graphprotocol/[email protected] and let me know if we need to reopen this issue.

@matthewlilley
Copy link
Author

Unfortunately this issue persists on Node v14 with 0.0.5 & 0.0.6 blocking production builds.

image

@matthewlilley
Copy link
Author

@dotansimha looks like this needs to be re-opened.

@dotansimha
Copy link
Collaborator

@dotansimha looks like this needs to be re-opened.

This happens because Webpack tries to bundle all code, and not just the runtime code that's used (which makes sense...).
The actual issue here is with undici, that's the one @n1ru4l fixed in nodejs/undici#1318 .

I'm reopening, let's wait for nodejs/undici#1372 to be resolved and have a new release of undici :(

@dotansimha dotansimha reopened this May 1, 2022
@matthewlilley
Copy link
Author

matthewlilley commented May 1, 2022

@dotansimha Yeah, makes sense.

v5.1.0 was released a few hours ago.

https://github.com/nodejs/undici/releases/tag/v5.1.0

@dotansimha
Copy link
Collaborator

dotansimha commented May 2, 2022

Perfect! I see @ardatan already released cross-undici-fetch (https://github.com/ardatan/whatwg-node/blob/master/packages/cross-undici-fetch/package.json#L25).

So now the missing piece in that puzzle is: release GraphQL-Mesh -> then we can upgrade and release graph-client.

In the meantime, if you are using Yarn, you can add to your package.json:

"resolutions": {
  "undici": "5.1.0"
}

@dotansimha dotansimha added bug Something isn't working dependencies labels May 2, 2022
@dotansimha dotansimha self-assigned this May 2, 2022
@dotansimha
Copy link
Collaborator

@matthewlilley can you try @graphprotocol/[email protected]? :) It should use latest version of all packages, and should solve this issue.

@matthewlilley
Copy link
Author

@dotansimha great, will try now

@matthewlilley
Copy link
Author

@dotansimha Are you sure it was published?

 ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @graphprotocol/[email protected]

The latest release of @graphprotocol/client-cli is "0.0.6".

@dotansimha
Copy link
Collaborator

Yeah, sometimes NPM needs a few minutes after publishing a new version :)

https://www.npmjs.com/package/@graphprotocol/client-cli

image

@matthewlilley
Copy link
Author

aha, too fast

@matthewlilley
Copy link
Author

matthewlilley commented May 2, 2022

@dotansimha

Screenshot_821

We have a new one unfortunately :(

This is different from the previous...

@dotansimha
Copy link
Collaborator

@dotansimha

Screenshot_821

We have a new one unfortunately :(

This is different from the previous...

Can you please try yarn why undici or pnpm why undici and share the output?

@matthewlilley
Copy link
Author

I'll dump output here, couldn't see anything from a quick glance.

@graphprotocol/client-cli 0.0.6
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/cli 0.68.1
│ │ [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/config 0.35.1
│ │ │ [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/cache-inmemory-lru 0.6.15
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.7.8
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.1
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.0
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.1
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.0
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/merger-bare 0.13.38
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.7.8
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.1
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.0
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.1
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.0
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/merger-stitching 0.15.40
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/store 0.7.8
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/utils 0.34.1
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ cross-undici-fetch 0.3.0
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └── undici 5.1.0
│ │ │ │         [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.7.8
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.1
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.0
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.1
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.0
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/runtime 0.34.1
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.7.8
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.1
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.0
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.1
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.0
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/store 0.7.8
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.1
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.0
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/store 0.7.8
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ @graphql-mesh/utils 0.34.1
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └─┬ cross-undici-fetch 0.3.0
│ │ │       │ [Could not find additional info about this dependency]
│ │ │       └── undici 5.1.0
│ │ │           [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/utils 0.34.1
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ cross-undici-fetch 0.3.0
│ │     │ [Could not find additional info about this dependency]
│ │     └── undici 5.1.0
│ │         [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/runtime 0.34.1
│ │ │ [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/store 0.7.8
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ @graphql-mesh/utils 0.34.1
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └─┬ cross-undici-fetch 0.3.0
│ │ │       │ [Could not find additional info about this dependency]
│ │ │       └── undici 5.1.0
│ │ │           [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/utils 0.34.1
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ cross-undici-fetch 0.3.0
│ │     │ [Could not find additional info about this dependency]
│ │     └── undici 5.1.0
│ │         [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/store 0.7.8
│ │ │ [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/utils 0.34.1
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ cross-undici-fetch 0.3.0
│ │     │ [Could not find additional info about this dependency]
│ │     └── undici 5.1.0
│ │         [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/types 0.71.1
│ │ │ [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/store 0.7.8
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ @graphql-mesh/utils 0.34.1
│ │     │ [Could not find additional info about this dependency]
│ │     └─┬ cross-undici-fetch 0.3.0
│ │       │ [Could not find additional info about this dependency]
│ │       └── undici 5.1.0
│ │           [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/utils 0.34.1
│ │ │ [Could not find additional info about this dependency]
│ │ └─┬ cross-undici-fetch 0.3.0
│ │   │ [Could not find additional info about this dependency]
│ │   └── undici 5.1.0
│ │       [Could not find additional info about this dependency]
│ └─┬ @graphql-yoga/node 2.3.0
│   │ [Could not find additional info about this dependency]
│   ├─┬ @graphql-yoga/common 2.3.0
│   │ │ [Could not find additional info about this dependency]
│   │ └─┬ cross-undici-fetch 0.2.5
│   │   │ [Could not find additional info about this dependency]
│   │   └── undici 5.1.0
│   │       [Could not find additional info about this dependency]
│   └─┬ cross-undici-fetch 0.2.5
│     │ [Could not find additional info about this dependency]
│     └── undici 5.1.0
│         [Could not find additional info about this dependency]
└─┬ @graphql-mesh/graphql 0.23.9
  │ [Could not find additional info about this dependency]
  ├─┬ @graphql-mesh/store 0.7.8
  │ │ [Could not find additional info about this dependency]
  │ └─┬ @graphql-mesh/utils 0.34.1
  │   │ [Could not find additional info about this dependency]
  │   └─┬ cross-undici-fetch 0.3.0
  │     │ [Could not find additional info about this dependency]
  │     └── undici 5.1.0
  │         [Could not find additional info about this dependency]
  ├─┬ @graphql-mesh/types 0.71.1
  │ │ [Could not find additional info about this dependency]
  │ └─┬ @graphql-mesh/store 0.7.8
  │   │ [Could not find additional info about this dependency]
  │   └─┬ @graphql-mesh/utils 0.34.1
  │     │ [Could not find additional info about this dependency]
  │     └─┬ cross-undici-fetch 0.3.0
  │       │ [Could not find additional info about this dependency]
  │       └── undici 5.1.0
  │           [Could not find additional info about this dependency]
  ├─┬ @graphql-mesh/utils 0.34.1
  │ │ [Could not find additional info about this dependency]
  │ └─┬ cross-undici-fetch 0.3.0
  │   │ [Could not find additional info about this dependency]
  │   └── undici 5.1.0
  │       [Could not find additional info about this dependency]
  └─┬ @graphql-tools/url-loader 7.9.14
    │ [Could not find additional info about this dependency]
    ├─┬ @graphql-yoga/node 2.3.0
    │ │ [Could not find additional info about this dependency]
    │ ├─┬ @graphql-yoga/common 2.3.0
    │ │ │ [Could not find additional info about this dependency]
    │ │ └─┬ cross-undici-fetch 0.2.5
    │ │   │ [Could not find additional info about this dependency]
    │ │   └── undici 5.1.0
    │ │       [Could not find additional info about this dependency]
    │ └─┬ cross-undici-fetch 0.2.5
    │   │ [Could not find additional info about this dependency]
    │   └── undici 5.1.0
    │       [Could not find additional info about this dependency]
    └─┬ cross-undici-fetch 0.3.1
      │ [Could not find additional info about this dependency]
      └── undici 5.1.0
          [Could not find additional info about this dependency]
@graphql-mesh/transform-prefix 0.11.39
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/types 0.72.0
│ │ [Could not find additional info about this dependency]
│ └─┬ @graphql-mesh/store 0.8.3
│   │ [Could not find additional info about this dependency]
│   └─┬ @graphql-mesh/utils 0.34.5
│     │ [Could not find additional info about this dependency]
│     └─┬ cross-undici-fetch 0.3.1
│       │ [Could not find additional info about this dependency]
│       └── undici 5.1.0
│           [Could not find additional info about this dependency]
└─┬ @graphql-mesh/utils 0.34.5
  │ [Could not find additional info about this dependency]
  └─┬ cross-undici-fetch 0.3.1
    │ [Could not find additional info about this dependency]
    └── undici 5.1.0
        [Could not find additional info about this dependency]
@graphql-mesh/transform-rename 0.12.40
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/types 0.72.0
│ │ [Could not find additional info about this dependency]
│ └─┬ @graphql-mesh/store 0.8.3
│   │ [Could not find additional info about this dependency]
│   └─┬ @graphql-mesh/utils 0.34.5
│     │ [Could not find additional info about this dependency]
│     └─┬ cross-undici-fetch 0.3.1
│       │ [Could not find additional info about this dependency]
│       └── undici 5.1.0
│           [Could not find additional info about this dependency]
└─┬ @graphql-mesh/utils 0.34.5
  │ [Could not find additional info about this dependency]
  └─┬ cross-undici-fetch 0.3.1
    │ [Could not find additional info about this dependency]
    └── undici 5.1.0
        [Could not find additional info about this dependency]
@graphql-mesh/transform-type-merging 0.3.49
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/types 0.72.0
│ │ [Could not find additional info about this dependency]
│ └─┬ @graphql-mesh/store 0.8.3
│   │ [Could not find additional info about this dependency]
│   └─┬ @graphql-mesh/utils 0.34.5
│     │ [Could not find additional info about this dependency]
│     └─┬ cross-undici-fetch 0.3.1
│       │ [Could not find additional info about this dependency]
│       └── undici 5.1.0
│           [Could not find additional info about this dependency]
└─┬ @graphql-mesh/utils 0.34.5
  │ [Could not find additional info about this dependency]
  └─┬ cross-undici-fetch 0.3.1
    │ [Could not find additional info about this dependency]
    └── undici 5.1.0
        [Could not find additional info about this dependency]

[email protected] /home/feedme/sushi/interface/apps/furo

devDependencies:
@graphprotocol/client-cli 0.0.7
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/cli 0.69.2
│ │ [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/config 0.36.1
│ │ │ [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/cache-localforage 0.6.1
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.8.4
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.6
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.6
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.6
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/merger-bare 0.13.43
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.8.4
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.6
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.6
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.6
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/merger-stitching 0.15.45
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/store 0.8.4
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/utils 0.34.6
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ cross-undici-fetch 0.3.6
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └── undici 5.1.0
│ │ │ │         [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.8.4
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.6
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.6
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.6
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/runtime 0.34.6
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ │ │ [Could not find additional info about this dependency]
│ │ │ │ └─┬ @graphql-mesh/store 0.8.4
│ │ │ │   │ [Could not find additional info about this dependency]
│ │ │ │   └─┬ @graphql-mesh/utils 0.34.6
│ │ │ │     │ [Could not find additional info about this dependency]
│ │ │ │     └─┬ cross-undici-fetch 0.3.6
│ │ │ │       │ [Could not find additional info about this dependency]
│ │ │ │       └── undici 5.1.0
│ │ │ │           [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.6
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/store 0.8.4
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/utils 0.34.6
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ cross-undici-fetch 0.3.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └── undici 5.1.0
│ │ │         [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/store 0.8.4
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ @graphql-mesh/utils 0.34.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └─┬ cross-undici-fetch 0.3.6
│ │ │       │ [Could not find additional info about this dependency]
│ │ │       └── undici 5.1.0
│ │ │           [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/utils 0.34.6
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ cross-undici-fetch 0.3.6
│ │     │ [Could not find additional info about this dependency]
│ │     └── undici 5.1.0
│ │         [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/runtime 0.34.6
│ │ │ [Could not find additional info about this dependency]
│ │ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ │ [Could not find additional info about this dependency]
│ │ │ └─┬ @graphql-mesh/store 0.8.4
│ │ │   │ [Could not find additional info about this dependency]
│ │ │   └─┬ @graphql-mesh/utils 0.34.6
│ │ │     │ [Could not find additional info about this dependency]
│ │ │     └─┬ cross-undici-fetch 0.3.6
│ │ │       │ [Could not find additional info about this dependency]
│ │ │       └── undici 5.1.0
│ │ │           [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/utils 0.34.6
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ cross-undici-fetch 0.3.6
│ │     │ [Could not find additional info about this dependency]
│ │     └── undici 5.1.0
│ │         [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/store 0.8.4
│ │ │ [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/utils 0.34.6
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ cross-undici-fetch 0.3.6
│ │     │ [Could not find additional info about this dependency]
│ │     └── undici 5.1.0
│ │         [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/types 0.72.1
│ │ │ [Could not find additional info about this dependency]
│ │ └─┬ @graphql-mesh/store 0.8.4
│ │   │ [Could not find additional info about this dependency]
│ │   └─┬ @graphql-mesh/utils 0.34.6
│ │     │ [Could not find additional info about this dependency]
│ │     └─┬ cross-undici-fetch 0.3.6
│ │       │ [Could not find additional info about this dependency]
│ │       └── undici 5.1.0
│ │           [Could not find additional info about this dependency]
│ ├─┬ @graphql-mesh/utils 0.34.6
│ │ │ [Could not find additional info about this dependency]
│ │ └─┬ cross-undici-fetch 0.3.6
│ │   │ [Could not find additional info about this dependency]
│ │   └── undici 5.1.0
│ │       [Could not find additional info about this dependency]
│ └─┬ @graphql-yoga/node 2.4.0
│   │ [Could not find additional info about this dependency]
│   ├─┬ @graphql-yoga/common 2.4.0
│   │ │ [Could not find additional info about this dependency]
│   │ └─┬ cross-undici-fetch 0.3.6
│   │   │ [Could not find additional info about this dependency]
│   │   └── undici 5.1.0
│   │       [Could not find additional info about this dependency]
│   └─┬ cross-undici-fetch 0.3.1
│     │ [Could not find additional info about this dependency]
│     └── undici 5.1.0
│         [Could not find additional info about this dependency]
└─┬ @graphql-mesh/graphql 0.25.2
  │ [Could not find additional info about this dependency]
  ├─┬ @graphql-mesh/store 0.8.4
  │ │ [Could not find additional info about this dependency]
  │ └─┬ @graphql-mesh/utils 0.34.6
  │   │ [Could not find additional info about this dependency]
  │   └─┬ cross-undici-fetch 0.3.6
  │     │ [Could not find additional info about this dependency]
  │     └── undici 5.1.0
  │         [Could not find additional info about this dependency]
  ├─┬ @graphql-mesh/types 0.72.1
  │ │ [Could not find additional info about this dependency]
  │ └─┬ @graphql-mesh/store 0.8.4
  │   │ [Could not find additional info about this dependency]
  │   └─┬ @graphql-mesh/utils 0.34.6
  │     │ [Could not find additional info about this dependency]
  │     └─┬ cross-undici-fetch 0.3.6
  │       │ [Could not find additional info about this dependency]
  │       └── undici 5.1.0
  │           [Could not find additional info about this dependency]
  ├─┬ @graphql-mesh/utils 0.34.6
  │ │ [Could not find additional info about this dependency]
  │ └─┬ cross-undici-fetch 0.3.6
  │   │ [Could not find additional info about this dependency]
  │   └── undici 5.1.0
  │       [Could not find additional info about this dependency]
  └─┬ @graphql-tools/url-loader 7.9.19
    │ [Could not find additional info about this dependency]
    └─┬ cross-undici-fetch 0.3.6
      │ [Could not find additional info about this dependency]
      └── undici 5.1.0
          [Could not find additional info about this dependency]
@graphql-mesh/transform-prefix 0.11.39
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/types 0.72.0
│ │ [Could not find additional info about this dependency]
│ └─┬ @graphql-mesh/store 0.8.3
│   │ [Could not find additional info about this dependency]
│   └─┬ @graphql-mesh/utils 0.34.5
│     │ [Could not find additional info about this dependency]
│     └─┬ cross-undici-fetch 0.3.1
│       │ [Could not find additional info about this dependency]
│       └── undici 5.1.0
│           [Could not find additional info about this dependency]
└─┬ @graphql-mesh/utils 0.34.5
  │ [Could not find additional info about this dependency]
  └─┬ cross-undici-fetch 0.3.1
    │ [Could not find additional info about this dependency]
    └── undici 5.1.0
        [Could not find additional info about this dependency]
@graphql-mesh/transform-rename 0.12.40
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/types 0.72.0
│ │ [Could not find additional info about this dependency]
│ └─┬ @graphql-mesh/store 0.8.3
│   │ [Could not find additional info about this dependency]
│   └─┬ @graphql-mesh/utils 0.34.5
│     │ [Could not find additional info about this dependency]
│     └─┬ cross-undici-fetch 0.3.1
│       │ [Could not find additional info about this dependency]
│       └── undici 5.1.0
│           [Could not find additional info about this dependency]
└─┬ @graphql-mesh/utils 0.34.5
  │ [Could not find additional info about this dependency]
  └─┬ cross-undici-fetch 0.3.1
    │ [Could not find additional info about this dependency]
    └── undici 5.1.0
        [Could not find additional info about this dependency]
@graphql-mesh/transform-type-merging 0.3.49
│ [Could not find additional info about this dependency]
├─┬ @graphql-mesh/types 0.72.0
│ │ [Could not find additional info about this dependency]
│ └─┬ @graphql-mesh/store 0.8.3
│   │ [Could not find additional info about this dependency]
│   └─┬ @graphql-mesh/utils 0.34.5
│     │ [Could not find additional info about this dependency]
│     └─┬ cross-undici-fetch 0.3.1
│       │ [Could not find additional info about this dependency]
│       └── undici 5.1.0
│           [Could not find additional info about this dependency]
└─┬ @graphql-mesh/utils 0.34.5
  │ [Could not find additional info about this dependency]
  └─┬ cross-undici-fetch 0.3.1
    │ [Could not find additional info about this dependency]
    └── undici 5.1.0
        [Could not find additional info about this dependency]

@ardatan
Copy link
Member

ardatan commented May 2, 2022

I see @graphprotocol/client-cli 0.0.6 in your log. Are you sure you have updated versions?

@matthewlilley
Copy link
Author

one second, there's multiple apps in here

@matthewlilley
Copy link
Author

I'll update all to 0.0.7 and try again, but I expect it's just because another app which I'm not trying to build is using it.

@matthewlilley
Copy link
Author

@ardatan all are using 0.0.7 now and same issue. This error is different from the previous though. Could it be another depedency?

@matthewlilley
Copy link
Author

this[kHeadersList][kHeadersSortedMap] ??= new Map([...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1))

This is a new error related to ??= operator, unrelated I think to previous.

@matthewlilley
Copy link
Author

nodejs/undici#1309

@matthewlilley
Copy link
Author

Looks like there's another culprit in the same library...

@ardatan
Copy link
Member

ardatan commented May 2, 2022

Do you have an example repository in somewhere so we can try to patch it and make sure that's the issue?

@matthewlilley
Copy link
Author

nodejs/undici#1397

@matthewlilley
Copy link
Author

Do you have an example repository in somewhere so we can try to patch it and make sure that's the issue?

@ardatan Yes, I can give you install commands.

  1. git clone https://github.com/sushiswap/interface.git
  2. pnpm i
  3. pnpx turbo run build --scope=furo

@matthewlilley
Copy link
Author

Of course, make sure you're on lts/fermium :)

@matthewlilley
Copy link
Author

@matthewlilley
Copy link
Author

@ardatan are you able to weigh in here? nodejs/undici#1397

@dotansimha
Copy link
Collaborator

@matthewlilley btw, what's your complete project setup? (next? something else? what bundler are you use and what's the version?)
From the screenshots above, I guess it's Webpack - so in this case you can ask Webpack/Babel to JS-compile undici in order to eliminate all syntaxes that are not supported on Node 14).

Actually the issue here is not even about runtime - since Mesh will not even use undici in a Node14 environment, just the fact that Webpack tries to bundle it is the actual blocker :/

@saihaj
Copy link
Member

saihaj commented May 3, 2022

@matthewlilley as @dotansimha mentioned this is an issue with bundling in NextJS and transpiling node_modules solves this issue

  1. pnpm add next-transpile-modules undici. We need to add undici as dependency cause otherwise it will not be able to transpile the package in prod build
  2. Now add this to next.config.js this will force it to transpile undici
const withTM = require('next-transpile-modules')(['undici'])

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  // your config option
}

module.exports = withTM(nextConfig)

Checkout saihaj/ens-nft-graph-client@e58d714

@matthewlilley
Copy link
Author

@dotansimha Vercel gave us experimental access to Node 16 which has rid the block for us for now.

@saihaj Ah, silly I didn't try this. We use next-transpile-modules a lot, but mostly for local packakges which don't have a build step.

@dotansimha
Copy link
Collaborator

Thanks for the update @matthewlilley !
Let's keep this open for visibility, and see how things progress on undici side.

@matthewlilley
Copy link
Author

@dotansimha should be continue to keep this one open? Node 16 support has pretty good coverage on our end now.

@ardatan ardatan closed this as completed Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies
Projects
Status: Done
Development

No branches or pull requests

5 participants