Error when compiling next js project after importing OpenSeaPort
See original GitHub issueSteps to reproduce
- Create a brand new project with
yarn create next-app
,npx create-next-app@latest
, orpnpm dlx create-next-app@latest
- Using your package manager of choice, add opensea-js
- Open
pages/index.js
- Add this import
import { OpenSeaPort } from "opensea-js";
- Save and run the project
OS: Garuda Linux x86_64 Kernel: 5.16.10-zen1-1-zen Node version: v16.13.2
Stack trace
error - ./node_modules/rustbn.js/lib/index.asm.js:1:1279
Module not found: Can't resolve 'fs'
Import trace for requested module:
./node_modules/rustbn.js/index.js
./node_modules/ethereumjs-vm/dist/evm/precompiles/06-ecadd.js
./node_modules/ethereumjs-vm/dist/evm/precompiles/index.js
./node_modules/ethereumjs-vm/dist/evm/evm.js
./node_modules/ethereumjs-vm/dist/runCode.js
./node_modules/ethereumjs-vm/dist/index.js
./node_modules/@0x/base-contract/lib/src/index.js
./node_modules/wyvern-js/lib/abi_gen/wyvern_d_a_o.js
./node_modules/wyvern-js/lib/wyvernProtocol.js
./node_modules/wyvern-js/lib/index.js
./node_modules/opensea-js/lib/seaport.js
./node_modules/opensea-js/lib/index.js
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:12
Top Results From Across the Web
module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >Why is there an error during build next.js project?
You should give the path of images, in error says that path can't be less that 0 char. /** @type {import('next').
Read more >How to Bypass ES Modules Errors in Next.js with Dynamic ...
When you are building an application that can be accessed on the web, there are a lot of dependencies or packages that you...
Read more >Best practices to increase the speed for Next.js apps
Traditionally, applications load all the components and the CSS required by the application in the initial load. Dynamic import allows you to ...
Read more >A Guide for Next.js with TypeScript - Refine Dev
With this, you can now start creating files with .ts and .tsx extensions in your application. Usage example. import React ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We are looking into this!
Adding this to the
next.config.js
fixed the compile error for usbut we still get a bunch of critical dependency errors in the console.