New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Module not found: Can't resolve imported dependency "fs"" after upgrading to v2 when using the MonacoEditor component #10249
Comments
|
@mYnDstrEAm Please read the upgrade guide here: https://quasar.dev/start/upgrade-guide#nodejs-polyfills |
@hawkeye64 I did! And even linked it in my question (the docs). These errors are showing after implementing what is written there – it's just fewer errors than before implementing it. (Please reopen or write how this can be solved when that is already implemented.) |
|
Should I try creating a new project with v2 rather than upgrading and copy over the code and see if that works? If it does something of the upgrade doesn't work because I installed node-polyfill-webpack-plugin ( |
|
@mYnDstrEAm please share a reproduction repo (or fork https://codesandbox.quasar.dev and post the link here) |
|
I created a blank new project with v2 via quasar create and found that it's caused by this line in a boot-file (referenced in quasar.conf.js): How to import the Monaco editor component in a Quasar v2 project? It seems like the "monaco-editor-webpack-plugin" isn't really needed but only "vue-monaco" is. It used to work before trying to upgrade to v2 and now I can't find any guidance about how to use external components in the docs. I think this needs a boot-file (just like before but somehow without "monaco-editor-webpack-plugin") and not just using Contents of the boot file MonacoEditor of the project that worked with v1 are: The current boot file is the default boot file content. |
|
@mYnDstrEAm A webpack plugin cannot be used as a Vue component. I think you meant to type |
|
So it's not working anymore because vue-monaco is incompatible with Vue3? I tried other things first but this is how the file looked like when I finally got it to work with Quasar v1. |
|
if you want to work with Quasar v2/Vue v3, then follow this thread: https://stackoverflow.com/questions/65025408/monaco-editor-web-worker-issue-with-vue-3 |
|
@hawkeye64 Thanks! However, there's no vue.config.js in Quasar projects so the answer there doesn't describe how to get it working with QF. As it used to work just fine I would have expected info about handling webpack-related things or whatever caused it to break to be in the upgrade guide. This page doesn't exist. So I can only speculate that I need to add sth like this to quasar.conf.js->build: or maybe Is that right? Could you provide a little more info if that isn't in the docs but used to work? Should "monaco-editor-webpack-plugin" be imported in the boot-file (results in the errors of the issue) or in quasar.conf.js (doesn't look right and I get the error "Conflict: Multiple assets emit different content to the same filename fonts/codicon.ttf") or elsewhere or not at all? Why make things more complex than they need to be and the info could be in or added to the docs. |
|
I don't know where that url came from. Try this one: https://quasar.dev/quasar-cli/handling-webpack I find Yes. Don't forget to import in quasar.conf.js... const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); |
|
Thanks, didn't forget about it but I still get this error in that case ("Conflict: Multiple assets emit different content to the same filename fonts/codicon.ttf"). I thought maybe it could be solved by specifying output within chainWebpack similar to here but I couldn't find out how. |
Could be that you have the same file included twice somewhere? |
|
It was because I still had Thank you very much! |
|
However, I need the Vue component so I need to find out how to solve this error and asked about it here. |
|
No answer there so far, please let me know if you have any idea how this could be solved ( |
|
@mYnDstrEAm Sorry, I am out of ideas. :( |
My electron app got the same error, and i fixed it: ref: https://stackoverflow.com/questions/64557638/how-to-polyfill-node-core-modules-in-webpack-5 |
Describe the bug
After upgrading Quasar to v2 like it worked for another project I got a lot of Module not found errors. Most of these could be resolved by implementing this: #9780 (comment). However, from the docs it seems like this isn't the preferred solution and some errors remained. The remaining errors can be found below.
It's probably caused by using the monaco-editor component which has more (or some specific) features than QuasarEditor which is why I used it. How to solve this (probably trivial)?
Codepen/jsFiddle/Codesandbox (required)
To Reproduce
Steps to reproduce the behavior:
quasar dev -m electron -- --no-sandbox --disable-setuid-sandbox(orquasar dev -m electron)Expected behavior
Expected step 2 to not be necessary or not be a little risky and the project to build via step 3.
Screenshots
Platform (please complete the following information):
Quasar Version:
@quasar/app Version:3.0.3
Quasar mode:
Tested on:
OS:Debian10/KDE
Node:v12.22.2
NPM:7.20.3
Yarn:
Browsers:
iOS:
Android:
Electron:13.1.7
Additional context
The text was updated successfully, but these errors were encountered: