Describe the bug
In next.js, import * as YMonaco from "y-monaco"; will (eventually) cause an error:
./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Location: node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionViewItems.js
To Reproduce
Steps to reproduce the behavior:
Create/clone a bog-standard next.js app
Add npm i y-monaco
Copy/paste the example code into pages/index.js
See error
Expected behavior
Some way of potentially delaying the import of monaco may help with the issue
Happy to help track this down, I know dealing with Monaco can be challenging in certain environments (though it is quite amazing once it's up and running!).
Describe the bug In next.js,
import * as YMonaco from "y-monaco";
will (eventually) cause an error:To Reproduce Steps to reproduce the behavior:
npm i y-monaco
pages/index.js
Expected behavior Some way of potentially delaying the import of
monaco
may help with the issueEnvironment Information
Happy to help track this down, I know dealing with Monaco can be challenging in certain environments (though it is quite amazing once it's up and running!).