File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ export default async ({
153
153
} as NodeJS . ProcessEnv ,
154
154
} ;
155
155
156
+ delete spawnOpts . env . NODE_OPTIONS ;
157
+
156
158
if ( runAsNode ) {
157
159
spawnOpts . env . ELECTRON_RUN_AS_NODE = 'true' ;
158
160
} else {
Original file line number Diff line number Diff line change @@ -66,6 +66,13 @@ function getElectronModuleName(packageJSON: PackageJSONWithDeps): string {
66
66
async function getElectronPackageJSONPath ( dir : string , packageName : string ) : Promise < string | undefined > {
67
67
const nodeModulesPath = await determineNodeModulesPath ( dir , packageName ) ;
68
68
if ( ! nodeModulesPath ) {
69
+ try {
70
+ // Yarn PnP
71
+ // eslint-disable-next-line node/no-missing-require
72
+ return require . resolve ( 'electron/package.json' ) ;
73
+ } catch ( e ) {
74
+ // Ignore
75
+ }
69
76
throw new PackageNotFoundError ( packageName , dir ) ;
70
77
}
71
78
You can’t perform that action at this time.
0 commit comments