使用 mathjax-angular 的网站中的数学方程

问题描述 投票:0回答:1

我正在尝试将数学方程的乳胶格式转换为 Angular 13 应用程序中的网站。我为此找到了 mathjax-angular 并尝试使用安装

npm install mathjax-angular

但是我遇到了一些对等依赖错误,如下所示。

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"~13.3.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^14.0.0" from [email protected]
npm ERR! node_modules/mathjax-angular
npm ERR!   mathjax-angular@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 

对于这个问题你有什么建议?您有什么建议将 Latex 格式转换为网站的数学符号吗?

angular typescript mathjax
1个回答
0
投票

从这里回答

这是 npm 版本的问题。在旧版本中,遗留的对等依赖冲突被忽略,这在新版本中发生了变化。

运行:

npm install mathjax-angular --legacy-peer-deps
© www.soinside.com 2019 - 2024. All rights reserved.