How to downgrade the dependencies for npm packages in StackBlitz?

醉酒当歌 提交于 2019-12-04 01:24:37

问题


I'm trying to create an app for demo propose on StackBlitz and must use Angular 5.2.x because my app is still using 5.2.x. I just can't downgrade from v6 to v5.2 when I try to install the dependencies.

I actually need e.g. "@angular/common": "^5.2.10", "rxjs": "^5.5.10", "@angular/http": "^5.2.10" etc. But it just force me to install the v6.

Is there a possibilities to avoid this and install the needed versions or there is no way?

Have been checking the doc for Stackblitz, but didn't find something talking about such case.


回答1:


Delete the existing package by clicking the trash can when hovering over the package: Where it says enter package name type @angular/common@5.2.10 and click enter.

The package will be installed. Repeat for rxjs@5.5.10 and @http/common@5.2.10




回答2:


I thinks the best way is to generate an angular project with the version you want and host it at github then browser the project online at StackBlitz ,It 's look like import an angular project.

read more about this Run Angular CLI repos directly in your browser



来源:https://stackoverflow.com/questions/51632971/how-to-downgrade-the-dependencies-for-npm-packages-in-stackblitz

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!