【问题标题】:How can I download and Use Angular project off of Stackblitz?如何从 Stackblitz 下载和使用 Angular 项目?
【发布时间】:2021-06-06 10:43:57
【问题描述】:

所以我在 stackblitz 上有一个可用的项目,我想将其离线用于我自己的目的。作为参考,这里是我想要使用的链接-https://stackblitz.com/edit/nvs-angular-search-dropdown-istnzp。因此,我尝试下载代码并计划使用npm installng serve 运行它。但我在运行npm install 时遇到很多错误,如下所示:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: angular@0.0.0
npm ERR! Found: @angular/compiler@12.0.3
npm ERR! node_modules/@angular/compiler
npm ERR!   @angular/compiler@"^12.0.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"7.0.4" from @angular/compiler-cli@7.0.4
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   dev @angular/compiler-cli@"~7.0.0" 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!
npm ERR! See C:\Users\cnaag\AppData\Local\npm-cache\eresolve-report.txt for a full report.    

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\cnaag\AppData\Local\npm-cache\_logs\2021-06-06T10_39_43_617Z-debug.log 

在这方面的任何帮助都会很棒!

【问题讨论】:

  • 您是否尝试过消息所暗示的内容,即。 npm install --legacy-peer-deps?
  • 是的,没有帮助。它仍然拒绝前进

标签: javascript angular stackblitz


【解决方案1】:

在你的机器上安装 Yarn 而不是 NPM,然后运行 ​​yarn install

【讨论】:

    猜你喜欢
    • 2019-02-21
    • 1970-01-01
    • 2021-09-26
    • 2023-02-26
    • 2018-12-15
    • 2021-04-11
    • 1970-01-01
    • 1970-01-01
    • 2022-06-14
    相关资源
    最近更新 更多