solana-labs / solana-program-library

A collection of Solana programs maintained by Solana Labs
https://solanalabs.com
Apache License 2.0
3.56k stars 2.08k forks source link

./node_modules/@solana/buffer-layout-utils/lib/esm/web3.mjs Can't import the named export 'PublicKey' from non EcmaScript module (only default export is available) #3723

Closed Mago2022 closed 11 months ago

Mago2022 commented 2 years ago

./node_modules/@solana/buffer-layout-utils/lib/esm/web3.mjs Can't import the named export 'PublicKey' from non EcmaScript module (only default export is available)

Mago2022 commented 2 years ago

I removed package-lock.json and node_modules. And did npm install again. Still doesnt work.

  "dependencies": {
    "@project-serum/sol-wallet-adapter": "0.2.6",
    "@solana/spl-token": "0.3.5",
    "@solana/web3.js": "1.66.1",
    "react-dom": "^17.0.2",
  },
magicdima commented 2 years ago

looks like similar to #3014 and take a look at https://github.com/solana-labs/wallet-adapter/issues/265