File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ export default async ({
153153 } as NodeJS . ProcessEnv ,
154154 } ;
155155
156+ delete spawnOpts . env . NODE_OPTIONS ;
157+
156158 if ( runAsNode ) {
157159 spawnOpts . env . ELECTRON_RUN_AS_NODE = 'true' ;
158160 } else {
Original file line number Diff line number Diff line change @@ -66,6 +66,13 @@ function getElectronModuleName(packageJSON: PackageJSONWithDeps): string {
6666async function getElectronPackageJSONPath ( dir : string , packageName : string ) : Promise < string | undefined > {
6767 const nodeModulesPath = await determineNodeModulesPath ( dir , packageName ) ;
6868 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+ }
6976 throw new PackageNotFoundError ( packageName , dir ) ;
7077 }
7178
You can’t perform that action at this time.
0 commit comments