File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " wrangler " : patch
3
+ ---
4
+
5
+ fix: print instructions even if installPackages fails to fetch npm packages
Original file line number Diff line number Diff line change @@ -759,7 +759,17 @@ function createCLIParser(argv: string[]) {
759
759
}
760
760
}
761
761
// install packages as the final step of init
762
- await installPackages ( shouldRunPackageManagerInstall , devDepsToInstall ) ;
762
+ try {
763
+ await installPackages ( shouldRunPackageManagerInstall , devDepsToInstall ) ;
764
+ } catch ( e ) {
765
+ // fetching packages could fail due to loss of internet, etc
766
+ // we should let folks know we failed to fetch, but their
767
+ // workers project is still ready to go
768
+ logger . error ( e instanceof Error ? e . message : e ) ;
769
+ instructions . push (
770
+ "\n🚨 wrangler was unable to fetch your npm packages, but your project is ready to go"
771
+ ) ;
772
+ }
763
773
764
774
// let users know what to do now
765
775
instructions . forEach ( ( instruction ) => logger . log ( instruction ) ) ;
You can’t perform that action at this time.
0 commit comments