File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,10 @@ export const compilerCommand = (() => {
53
53
`sass-embedded-${ platform } -${ arch } /dart-sass/src/sass.snapshot`
54
54
) ,
55
55
] ;
56
- } catch ( ignored ) {
57
- // ignored
56
+ } catch ( e ) {
57
+ if ( ! ( isErrnoException ( e ) && e . code === 'MODULE_NOT_FOUND' ) ) {
58
+ throw e ;
59
+ }
58
60
}
59
61
60
62
try {
@@ -70,10 +72,21 @@ export const compilerCommand = (() => {
70
72
}
71
73
}
72
74
75
+ try {
76
+ return [
77
+ process . execPath ,
78
+ p . join ( p . dirname ( require . resolve ( 'sass' ) ) , 'sass.js' ) ,
79
+ ] ;
80
+ } catch ( e : unknown ) {
81
+ if ( ! ( isErrnoException ( e ) && e . code === 'MODULE_NOT_FOUND' ) ) {
82
+ throw e ;
83
+ }
84
+ }
85
+
73
86
throw new Error (
74
87
"Embedded Dart Sass couldn't find the embedded compiler executable. " +
75
88
'Please make sure the optional dependency ' +
76
- `sass-embedded-${ platform } -${ arch } is installed in ` +
89
+ `sass-embedded-${ platform } -${ arch } or sass is installed in ` +
77
90
'node_modules.'
78
91
) ;
79
92
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments