ethereum / solc-js

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

Uncaught ReferenceError: window is not defined #750

Open sajshuai opened 1 week ago

sajshuai commented 1 week 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 6 days 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.