Skip to content
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

Error: Cannot find module 'monaco-editor\esm\vs\editor\contrib\gotoSymbol\goToCommands' #71

Open
vakhariasohil opened this issue Jan 2, 2020 · 7 comments

Comments

@vakhariasohil
Copy link

I am using below versions for monaco editor and its plugin

"monaco-editor": "0.19.0",
"monaco-editor-webpack-plugin": "1.8.1"

I am getting below error

 ...\node_modules\webpack-cli\bin\cli.js:265
                              throw err;
                              ^

 Error: Cannot find module 'monaco-editor\esm\vs\editor\contrib\gotoSymbol\goToCommands'
     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
     at Function.resolve (...\node_modules\v8-compile-cache\v8-compile-cache.js:166:23)
     at resolveMonacoPath (...\node_modules\monaco-editor-webpack-plugin\out\index.js:26:20)
     at use.options.pre.featurePaths.map (...\node_modules\monaco-editor-webpack-plugin\out\index.js:161:63)
     at Array.map (<anonymous>)
     at createLoaderRules (...\node_modules\monaco-editor-webpack-plugin\out\index.js:161:43)
     at MonacoEditorWebpackPlugin.apply (...\node_modules\monaco-editor-webpack-plugin\out\index.js:80:23)
     at webpack (...\node_modules\webpack\lib\webpack.js:47:13)
     at processOptions (...\node_modules\webpack-cli\bin\cli.js:256:16)
     at yargs.parse (...\node_modules\webpack-cli\bin\cli.js:373:3)
     at Object.parse (...\node_modules\webpack-cli\node_modules\yargs\yargs.js:567:18)
     at ...\node_modules\webpack-cli\bin\cli.js:49:8
     at Object.<anonymous> (...\node_modules\webpack-cli\bin\cli.js:375:3)
     at Module._compile (internal/modules/cjs/loader.js:778:30)
     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
     at Module.load (internal/modules/cjs/loader.js:653:32)
     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
     at Module.require (internal/modules/cjs/loader.js:692:17)
     at require (internal/modules/cjs/helpers.js:25:18)
     at Object.<anonymous> (...\node_modules\webpack\bin\webpack.js:156:2)
     at Module._compile (internal/modules/cjs/loader.js:778:30)
     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
     at Module.load (internal/modules/cjs/loader.js:653:32)
     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
     at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
     at startup (internal/bootstrap/node.js:283:19)
     at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
error: Error: webpack failed! [code 1]

I cannot find any recent issue or Stackoverflow page for this error with given version.

Could you please help?

@iscarecrow
Copy link

+1

timoschwarzer added a commit to timoschwarzer/gitlab-monitor that referenced this issue Jan 15, 2020
@dzcpy
Copy link

dzcpy commented Feb 1, 2020

+2

@jozsefsallai
Copy link

This is an issue with monaco-editor-webpack-plugin, not vue-monaco. There is a workaround for it though: microsoft/monaco-editor-webpack-plugin#92 (comment)

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' ]
})

@timoschwarzer
Copy link

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 microsoft/monaco-editor-webpack-plugin#92 (comment) 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

@cinderisles
Copy link

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

@vakhariasohil
Copy link
Author

vakhariasohil commented Mar 24, 2020

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.

@Poikilos
Copy link

I have the error as well.

  • OS: Windows 10.

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:

not tried yet

  • change "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?

georg-schwarz added a commit to jvalue/ods that referenced this issue Mar 8, 2021
* Adapter-it: upgrade dependencies

* Notification: update dependencies

* Notification-it: update dependencies

* Pipeline-it: update dependencies

* Pipeline: update dependencies

* Scheduler-it: update dependencies

* Scheduler: update dependencies

* Storage-it: update dependencies

* Storage-mq: update dependencies

* System-test: update dependencies

* UI: update dependencies

* Adapter: update dependencies

* Notification-it: adapt to breaking changes of koa lib

* UI: explicitly add monaco-editor as dependency to resolve build error (egoist/vue-monaco#71)

* UI: bugfixing

* Update Docker base containers

* Reduce version of `monaco-editor-webpack-plugin` to 1.9.0 since it results in longer build times / build overheads

* Scheduler: log CI error when shutting down KOA mock server

* Notification-it: log mock receiver closing error

* Adapter-it: log mock server shutdown error

* It: downgrade node to 14 since stopping does not work

* It: add comment for node version downgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants