• Welcome to LiuJason's Blog!

[已解决]nodejs编译报错Cannot find module 'vs/editor/standalone/browser/quickOpen/gotoLine'

Linux笔记 Jason 4 years ago (2020-10-26) 1186 Views 0 Comments
文章目录[隐藏]

问题描述

今天编译一个nodejs的前端项目,出现报错:

Cannot find module 'vs/editor/standalone/browser/quickOpen/gotoLine'
Require stack:
- /root/backend-pro-master/assets/node_modules/monaco-editor-webpack-plugin/out/index.js
- /root/backend-pro-master/assets/config/webpack.config.js
- /root/backend-pro-master/assets/scripts/build.js

问题原因

检查后发现是monaco-editor-webpack-plugin和monaco-editor的版本对应出现了问题,所以需要分别安装这两个npm包,并且按照官方的对应关系:

monaco-editor-webpack-plugin monaco-editor
2.*.* 0.21.*
1.9.* 0.20.*
1.8.* 0.19.*
1.7.* 0.18.*

解决方案

我这里选择了[email protected][email protected],安装即可:

npm install [email protected]
npm install [email protected]

This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/1032.html
Like (4)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址