0

When trying to run a TS file using bun, I get the following:

1 | import NodeWallet from "./nodewallet";
2 | import { isBrowser } from "./utils/common.js";
3 | export { default as BN } from "bn.js";
4 | export * as web3 from "@solana/web3.js";
5 | export { getProvider, setProvider, AnchorProvider, } from "./provider.js";
   ^
SyntaxError: Unexpected keyword 'export'
      at xxx/node_modules/@project-serum/anchor/dist/esm/index.js:5:0

Is there a way to fix this? The same code runs fine with ts-node

SpaceMonkey
  • 4,143
  • 5
  • 38
  • 60
  • I think you should not post this question with the nodejs tag as this may confuse people to think that it's a nodejs problem. – Alvin CHENG Feb 26 '23 at 05:14

0 Answers0