-
-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PnP] Cannot find the package "electron" #3611
Comments
Some open points:
|
@merceyz what is the correct resolution for yarn berry / PnP? forge/packages/utils/core-utils/src/electron-version.ts Lines 37 to 43 in 38f64e4
|
Use require.resolve(`${packageName}/package.json`, { paths: [dir] }); |
rtritto
changed the title
[Typescript + ESM + PnP]
[PnP] Cannot find the package "electron"
Jun 9, 2024
forge.config.cts
not recognized with PnP (Plug'n'Play)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pre-flight checklist
Electron Forge version
7.4.0
Electron version
30.1.0
Vite version
5.0.12
Operating system
Windows 11
Last known working Electron Forge version
No response
Expected behavior
No error
Actual behavior
Steps to reproduce
Clone https://github.com/caoxiemeihao/electron-vite-samples/tree/main/forge-esm-ts (you can use https://download-directory.github.io)
yarn set version berry
Add to
.yarnrc.yml
yarn add -D @electron-forge/shared-types @types/node
(add peer dependencies)yarn electron-forge start
Additional information
With
nodeLinker: node-modules
(instead ofnodeLinker: pnp
) it works.The error "Cannot find the package "electron"" imply that
forge.config.cts
file isn't found or is empty.Related #3209 #3502 #3572 #3582 yarnpkg/berry#1020
The text was updated successfully, but these errors were encountered: