npm ERR! dev @typescript-eslint/parser@“6.0.0-alpha“ from the root project

npm ERR! node_modules/@typescript-eslint/parser                                                              
npm ERR!   dev @typescript-eslint/parser@"6.0.0-alpha" from the root project                              
npm ERR!                                                                                                     
npm ERR! Could not resolve dependency:                                                                       
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR!   dev @typescript-eslint/eslint-plugin@"*" from the root project

这个问题是由于尝试安装的 @typescript-eslint/eslint-plugin 包需要一个名为 @typescript-eslint/parser 的包作为同伴(peer)依赖项,并且该同伴依赖项的版本应为 "6.0.0" 或 "6.0.0-alpha"。但是,可能由于某种原因,这个同伴依赖项没有被正确安装或者版本不兼容。

我们可以先安装@typescript-eslint/parser@^6.0.0

npm install @typescript-eslint/parser@^6.0.0

安装完成以后再去安装其他依赖即可

猜你喜欢

转载自blog.csdn.net/qq_19991931/article/details/134698174
今日推荐