0

We're in a Next.js app and attempting to use the client to generate signed messages from Orders. However, we're getting compile errors where it seems as though the lib requires the filesystem

Module not found: Can't resolve 'fs'
Import trace for requested module:
./node_modules/rustbn.js/index.js
./node_modules/@0x/base-contract/node_modules/ethereumjs-vm/dist/evm/precompiles/06-ecadd.js
./node_modules/@0x/base-contract/node_modules/ethereumjs-vm/dist/evm/precompiles/index.js
./node_modules/@0x/base-contract/node_modules/ethereumjs-vm/dist/state/stateManager.js
./node_modules/@0x/base-contract/node_modules/ethereumjs-vm/dist/state/index.js
./node_modules/@0x/base-contract/node_modules/ethereumjs-vm/dist/index.js
./node_modules/@0x/base-contract/lib/src/index.js
./node_modules/0x.js/lib/index.js
./utils/contractUtils.ts

Am I missing something fundamental about this tutorial?

https://github.com/0xProject/wiki/blob/master/tutorials/1-Create%2C-Validate%2C-Fill-Order.md

1 Answer 1

1

You can make use of Trader SDK for a more front-end friendly set up.

https://docs.swapsdk.xyz/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.