project-serum / serum-ts

Project Serum TypeScript monorepo
https://projectserum.com
Apache License 2.0
270 stars 245 forks source link

Please tell me about "ReferenceError: System is not defined." #212

Closed ShomaSakamoto closed 2 years ago

ShomaSakamoto commented 2 years ago

I have a question. I'm currently trying to place an order with serum-ts, and I imported the library as follows, following the "usage" of the official library

import { Account, Connection, PublicKey } from '@solana/web3.js';

As a result, I am getting the following error message.

import { Account, Connection, PublicKey } from '@solana/web3.js'; ^ ReferenceError: System is not defined

I don't think the code is wrong, but what does "system" mean in the above error? I would also like to know if there are any possible solutions.