Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade the dependencies for npm packages in StackBlitz?

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.

like image 582
k.vincent Avatar asked Aug 01 '18 12:08

k.vincent


People also ask

How do I downgrade a dependency in npm?

To downgrade an npm package, run the npm install <package>@<version> command. You need to provide the version you want to install with the @<version> syntax.

How do I use dependencies in Stackblitz?

Under the "Files" tree is a "Dependencies" section. You can add your dependencies there. If you just want the latest version you can just use the package name (ex: ngx-bootstrap ) or you can target a specific version (ex: [email protected] ).

How do I change the angular version in Stackblitz?

You can update the version manually by installing [email protected] .


1 Answers

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

The package will be installed. Repeat for [email protected] and @http/[email protected]

like image 178
Teddy Sterne Avatar answered Sep 19 '22 16:09

Teddy Sterne