developers icon indicating copy to clipboard operation
developers copied to clipboard

[DOCS] Error on `eth-optimism/sdk` import

Open Tschakki opened this issue 1 year ago • 2 comments

Brief Description of the Docs Request

Hey, I was following the guide Bridging ERC-20 Tokens to OP Mainnet With the Optimism SDK and received the following error when requiring the OP SDK:

mona@Monas-MacBook-Pro op-sample-project % node
Welcome to Node.js v18.17.0.
Type ".help" for more information.
> const optimism = require("@eth-optimism/sdk");
Uncaught TypeError: Cannot read properties of undefined (reading 'AddressZero')
    at Object.<anonymous> (/Users/mona/git/tests/op-sample-project/node_modules/.pnpm/@[email protected][email protected]/node_modules/@eth-optimism/sdk/dist/utils/chain-constants.js:34:40)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)

I was not able to proceed with the guide because of this error.

Tschakki avatar Mar 13 '24 17:03 Tschakki

@Tschakki apologize for the delay, I have notifed our devsupport team of this issue and we should have an answer or workaround in the next few days!

cpengilly avatar Apr 13 '24 21:04 cpengilly

Hey @Tschakki, I believe you, @ZakAyesh, and I have chatted on slack is this still an open issue?

sbvegan avatar Apr 15 '24 13:04 sbvegan

What was the solution to this?

MrDeadCe11 avatar Oct 25 '24 19:10 MrDeadCe11