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

Outdated webpack plugin usage? #12

Closed
sp00x opened this issue Sep 27, 2018 · 4 comments
Closed

Outdated webpack plugin usage? #12

sp00x opened this issue Sep 27, 2018 · 4 comments

Comments

@sp00x
Copy link

sp00x commented Sep 27, 2018

The webpack plugin usage seems outdated - I guess you're supposed to do it something like this now?

const MonacoEditorPlugin = require('monaco-editor-webpack-plugin')

module.exports = {
  configureWebpack: {
    plugins: [
      new MonacoEditorPlugin()
    ]
  }
}

Which didn't go well with npm run serve

ERROR  Error loading vue.config.js:
 ERROR  Error: Cannot find module 'monaco-editor\esm\vs\language\typescript\lib\typescriptServices'
Error: Cannot find module 'monaco-editor\esm\vs\language\typescript\lib\typescriptServices'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.resolve (internal/module.js:18:19)
    at resolveMonacoPath (c....\node_modules\monaco-editor-webpack-plugin\index.js:35:18)
    at Object.<anonymous> (c:.....\node_modules\monaco-editor-webpack-plugin\index.js:7:4)

So, I tried npm i -S monaco-editor, but that gave new interesting errors.. because it's probably a too new version.

Error: Cannot find module 'monaco-editor\esm\vs\editor\contrib\fontZoom\fontZoom'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.resolve (internal/module.js:18:19)
    at resolveMonacoPath (c<project-path>\node_modules\monaco-editor-webpack-plugin\index.js:21:18)
    at use.options.pre.featurePaths.map (c<project-path>\node_modules\monaco-editor-webpack-plugin\index.js:133:51)
    at Array.map (<anonymous>)
    at createLoaderRules (c<project-path>\node_modules\monaco-editor-webpack-plugin\index.js:133:31)
    at MonacoWebpackPlugin.apply (c<project-path>\node_modules\monaco-editor-webpack-plugin\index.js:71:19)
    at webpack (c<project-path>\node_modules\webpack\lib\webpack.js:37:12)
    at serve (c<project-path>\node_modules\@vue\cli-service\lib\commands\serve.js:112:22)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

Eventually I uninstalled both the monaco-editor and monaco-editor-webpack-plugin packages that were @ latest and did the ones in the package.json of the vue-monaco project, and then it seems to work better..

i.e. npm i -S [email protected] [email protected]

Maybe some updating is in order here to clarify and correct this?

Which version of monaco-editor and/or the webpack plugin needs to be installed?

@ramiy
Copy link
Contributor

ramiy commented Nov 3, 2018

See rethinkdb/rethinkdb-desktop#44

@DMXL say's that monaco-editor-webpack-plugin requires [email protected], while vue-monaco requires [email protected].

@DMXL
Copy link

DMXL commented Nov 7, 2018

@ramiy My references of the plugin version were messed up in that reply (corrected now). Yet you still manage to get what I actually meant somehow. Masterful and patient I'd say.

@ramiy
Copy link
Contributor

ramiy commented Dec 5, 2018

The issue is fixed with newer packages.

I've upgraded to [email protected] and [email protected] and all the errors are gone.

@egoist
Copy link
Owner

egoist commented Jan 4, 2019

As @ramiy said, it should be resolved by the latest version of [email protected]

@egoist egoist closed this as completed Jan 4, 2019
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

4 participants