egoist/vue-monaco

Error: Cannot find module 'vs/editor/contrib/anchorSelect/anchorSelect'

Opened this issue ยท 2 comments

HI,

I have this error when I run npm run serve

ERROR  Error: Cannot find module 'vs/editor/contrib/anchorSelect/anchorSelect'
Require stack:
- C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\monaco-editor-webpack-plugin\out\index.js
- C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\vue.config.js
- C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\package.json
Error: Cannot find module 'vs/editor/contrib/anchorSelect/anchorSelect'
Require stack:
- C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\monaco-editor-webpack-plugin\out\index.js
- C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\vue.config.js
- C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\package.json
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.resolve (internal/modules/cjs/helpers.js:83:19)
    at resolveMonacoPath (C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\monaco-editor-webpack-plugin\out\index.js:34:28)
    at C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\monaco-editor-webpack-plugin\out\index.js:181:63
    at Array.map (<anonymous>)
    at createLoaderRules (C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\monaco-editor-webpack-plugin\out\index.js:181:43)
    at webpack (C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\webpack\lib\webpack.js:51:13)
    at serve (C:\Users\xxxxx\source\repos\grpc-tester\Qualifit.GrpcTester.UI\node_modules\@vue\cli-service\lib\commands\serve.js:163:22)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) 

My package.json:

"monaco-editor-webpack-plugin": "^3.0.0",
"vue-monaco": "^1.2.2",

My vue.config.js

const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
module.exports = {
    publicPath: './',
    lintOnSave: false,
    runtimeCompiler: true,
    configureWebpack: {
        //Necessary to run npm link https://webpack.js.org/configuration/resolve/#resolve-symlinks
        resolve: {
            symlinks: false
        },           
    },
    chainWebpack: config => {
        config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
            {
                // Languages are loaded on demand at runtime
                languages: ['json', 'javascript', 'html', 'xml'],
                features: ['!gotoSymbol']
            }
        ])
    },
.....  bla bla 

Thanks,
Costi

@cbbrsc TL;DR yarn add monaco-editor

That should help you: #71 (comment)

this error is solved after installing monaco-editor@0.22.3 with monaco-editor-webpack-plugin@3.0.0