opensea-js: Cannot read properties of undefined (reading 'Function')

Hey guys Have an issue with version 4.0.17 but looks like its coming after upgrading dependency web3 to 1.8.1

TypeError: Cannot read properties of undefined (reading 'Function')
    at /Users/maksympalamarchuk/work/mbc/node_modules/opensea-js/lib/types.js:165:50
    at Object.<anonymous> (/Users/maksympalamarchuk/work/mbc/node_modules/opensea-js/lib/types.js:167:3)

I’m using it client side with NextJS 12.3.4 Typescript 4.9.4

tsconfig

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "es6",
      "dom"
    ],
    "baseUrl": ".",
    "strict": true,
    "noEmit": true,
    "allowJs": true,
    "jsx": "preserve",
    "module": "esnext",
    "incremental": true,
    "skipLibCheck": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "esModuleInterop": true,
    "isolatedModules": true,
    "strictNullChecks": true,
    "resolveJsonModule": true,
    "moduleResolution": "node",
    "noFallthroughCasesInSwitch": true,
    "useUnknownInCatchVariables": false,
    "allowSyntheticDefaultImports": true,
    "forceConsistentCasingInFileNames": true,
  },
  "exclude": [
    "node_modules"
  ],
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx"
  ]
}

Please advise

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

4.0.18 was just released but issue still persists. I’ve reverted back to 4.0.13 for the time being but you will still get the unsupported protocol error. The official OpenSea API twitter recommends updating to 4.0.16 now, but it’s currently not possible with NextJS it seems.

Hopefully someone from the OpenSea team can provide some direction or help to resolve the issue.