File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,13 @@ export class CommandsService implements ICommandsService {
29
29
private $extensibilityService : IExtensibilityService ,
30
30
private $optionsTracker : IOptionsTracker ,
31
31
private $projectDataService : IProjectDataService ) {
32
- const projectData = this . $projectDataService . getProjectData ( ) ;
32
+ let projectData = null ;
33
+ try {
34
+ projectData = this . $projectDataService . getProjectData ( ) ;
35
+ } catch ( err ) {
36
+ this . $logger . trace ( `Error while trying to get project data. More info: ${ err } ` ) ;
37
+ }
38
+
33
39
this . $options . setupOptions ( projectData ) ;
34
40
}
35
41
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export class Options {
35
35
return ;
36
36
}
37
37
38
- if ( projectData . isHmrEnabledByDefault ) {
38
+ if ( projectData && projectData . isHmrEnabledByDefault ) {
39
39
this . argv . bundle = this . argv . bundle !== undefined ? this . argv . bundle : "webpack" ;
40
40
this . argv . hmr = ! this . argv . release ;
41
41
}
You can’t perform that action at this time.
0 commit comments