indexer icon indicating copy to clipboard operation
indexer copied to clipboard

TypeError: this.splice is not a function for Indexer Service 0.20.3 using Node v16

Open datanexus-vincent opened this issue 3 years ago • 2 comments

I ran into this error when setting up my testnet to test out the action queue. This only happens on node v16 though. Switching to v14 let me run with no issues. Probably low priority for that reason but I wanted to report the bug nevertheless.

TypeError: this.splice is not a function
    at HeadersList.append (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/cross-undici-fetch/dist/patch-headers-list.js:44:16)
    at Headers.append (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/undici/lib/fetch/headers.js:239:31)
    at fill (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/undici/lib/fetch/headers.js:56:15)
    at new Headers (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/undici/lib/fetch/headers.js:180:7)
    at new Request (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/cross-undici-fetch/dist/create-node-ponyfill.js:78:29)
    at Object.fetch (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/cross-undici-fetch/dist/create-node-ponyfill.js:110:24)
    at defaultAsyncFetch (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphql-tools/url-loader/index.js:43:29)
    at /home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphql-tools/url-loader/index.js:479:36
    at new ValueOrPromise (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/value-or-promise/build/main/ValueOrPromise.js:14:21)
    at executor (/home/ubuntu/.nvm/versions/node/v16.15.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphql-tools/url-loader/index.js:447:20)

datanexus-vincent avatar Sep 02 '22 15:09 datanexus-vincent

Interesting, I use node v16 myself. I'll try to reproduce.

fordN avatar Sep 14 '22 23:09 fordN

Same issue here when downgraded from 18 to 16 (because of current issue with 18)

TypeError: this.splice is not a function at HeadersList.append (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/cross-undici-fetch/dist/patch-headers-list.js:44:16) at Headers.append (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/undici/lib/fetch/headers.js:239:31) at fill (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/undici/lib/fetch/headers.js:56:15) at new Headers (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/undici/lib/fetch/headers.js:180:7) at new Request (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/cross-undici-fetch/dist/create-node-ponyfill.js:78:29) at Object.fetch (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/cross-undici-fetch/dist/create-node-ponyfill.js:110:24) at defaultAsyncFetch (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphql-tools/url-loader/index.js:43:29) at /home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphql-tools/url-loader/index.js:479:36 at new ValueOrPromise (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/value-or-promise/build/main/ValueOrPromise.js:14:21) at executor (/home/graphval/.nvm/versions/node/v16.17.1/lib/node_modules/@graphprotocol/indexer-service/node_modules/@graphql-tools/url-loader/index.js:447:20)

oleksandrmarkelov avatar Oct 04 '22 22:10 oleksandrmarkelov