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 'vs/editor/contrib/anchorSelect/anchorSelect' #160

Open
cbbrsc opened this issue Feb 13, 2021 · 2 comments
Open

Comments

@cbbrsc
Copy link

cbbrsc commented Feb 13, 2021

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

@christopherklaus
Copy link

@cbbrsc TL;DR yarn add monaco-editor

That should help you: #71 (comment)

@AllanOricil
Copy link

this error is solved after installing [email protected] with [email protected]

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

3 participants