ethereum / solc-js

Javascript bindings for the Solidity compiler
https://soliditylang.org
MIT License
1.46k stars 478 forks source link

Uncaught ReferenceError: window is not defined #750

Open sajshuai opened 1 month ago

sajshuai commented 1 month ago

env: nextjs14.1.0

I Loading solc with web workers,and I get this error

image

This's my worker code

image
mehtavishwa30 commented 1 month ago

Hey @sajshuai!

The report above does not include enough information for us to diagnose the issue. Please provide a more detailed self-contained reproduction of the code causing the issue so that we can figure out what could be wrong. I would also recommend that you use text for the code snippets instead of a screenshot as a screenshot makes it hard for us to reproduce the error whereas we can simply copy the text while debugging.