You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix#9011
Under the two `package.json` framework, if there are no `node_modules`
in the `app` directory and `npmRebuild` is set to `false`, dependencies
will not be reinstalled. As a result, `npm list` will return empty. In
this case, we should attempt to retrieve the `node_modules` using the
`projectDir`, which can resolve this issue.
Using `getProjectRootPath` directly from `electron/rebuild` is not
accurate because it recursively searches upward level by level and
returns the first match it finds. If I set the `app` directory outside
the `project dir`, such as in another directory, the result returned by
`getProjectRootPath` in `electron/rebuild` will be incorrect. Therefore,
the `projectDir` should be passed in directly instead of searching
upward level by level.
https://github.com/electron/rebuild/blob/ff1ec40f82ca64e014079b246053f039b3cf4f23/src/search-module.ts#L76-L86

// Some native dependencies no longer use `install` hook for building their native module, (yarn 3+ removed implicit link of `install` and `rebuild` steps)
0 commit comments