Open vakhariasohil opened 4 years ago
+1
+2
This is an issue with monaco-editor-webpack-plugin, not vue-monaco. There is a workaround for it though: https://github.com/microsoft/monaco-editor-webpack-plugin/issues/92#issuecomment-569589854
It might also complain about the abap syntax highlighter. Exclude that too if that happens to you.
Here's what a plugin declaration looks like with those disabled:
new MonacoWebpackPlugin({
features: [ '!gotoSymbol' ],
languages: [ '!abap' ]
})
I don't think it's an issue with monaco-editor-webpack plugin.
vue-monaco depends on monaco-editor-webpack-plugin ^1.7.0 which currently resolves to 1.8.2. vue-monaco depends on monaco-editor ^0.18.0 which currently resolves to 0.18.1.
monaco-editor-webpack-plugin 1.8.2 has monaco-editor ^0.19.0 as peer dependency and according to https://github.com/microsoft/monaco-editor-webpack-plugin/issues/92#issuecomment-571148323 monaco-editor-webpack-plugin 1.18.1 is incompatible with monaco-editor 0.18.1.
As far as I can tell the solution would be vue-monaco updating to monaco-editor ^0.19.0
I had this issue and solved it by explicitly installing monaco-editor
and monaco-editor-webpack-plugin
from npm alongside vue-monaco
in my project.
My package.json:
"dependencies": {
// ...
"monaco-editor": "^0.20.0",
"vue-monaco": "^1.1.0"
},
"devDependencies": {
// ...
"monaco-editor-webpack-plugin": "^1.7.0"
},
so just try:
yarn add -D monaco-editor-webpack-plugin
yarn add monaco-editor
or its npm equivalent
The issue is resolved. Looks like 'goToCommands' was not available in the version itself. I had to change both monaco-editor and monaco-editor-webpack-plugin for this.
BTW there are few version of the plugin missing/not available supporting monaco-editor versions. Please take a look in to it.
I have the error as well.
I tried:
git clone https://github.com/reactide/reactide.git
git checkout 3.0-release
npm install
npm run webpack-production
and the error occurs, so I try:
npm install monaco-editor monaco-editor-webpack-plugin
npm run webpack-production
but that didn't help, so I try:
npm install vue-monaco
npm run webpack-production
"A complete log of this run": https://pastebin.com/KiLJyy7y
...still no success, so tried "alongside vue-monaco" @cavatron don't really know what that means, please explain. I tried:
cd node_modules/vue-monaco
npm install monaco-editor monaco-editor-webpack-plugin
cd ..\..
npm run webpack-production
@cavatron I tried mimicking your package.json:
changed "monaco-editor": "^0.14.3",
to "monaco-editor": "^0.20.0",
ran npm install
ran npm run webpack-production
ran npm run webpack-production
got more errors:
Module not found: Error: Can't resolve 'spawn-sync' in 'C:\PortableApps\reactide\node_modules\execa\node_modules\cross-spawn'
"monaco-editor-webpack-plugin": "^1.9.1",
to "monaco-editor-webpack-plugin": "^1.7.0",
npm install
again@cavatron or someone, should that upgrade and downgrade the two packages respectively? Is there any point in that now, and should I post this somewhere else at this point?
I am using below versions for monaco editor and its plugin
I am getting below error
I cannot find any recent issue or Stackoverflow page for this error with given version.
Could you please help?