electron-forge / electron-forge-docs

:electron: Mirror for Electron Forge's GitBook documentation
https://electronforge.io
86 stars 149 forks source link

Could not initialize new project #120

Closed vxfranky closed 1 year ago

vxfranky commented 1 year ago

ERROR CREATING PROJECT USING YARN THROUGH COREPACK.

franky@localhost Workspace % yarn create electron-app my-app ➤ YN0000: ┌ Resolution step ➤ YN0061: │ @npmcli/move-file@npm:2.0.1 is deprecated: This functionality has been moved to @npmcli/fs ➤ YN0000: └ Completed in 10s 707ms ➤ YN0000: ┌ Fetch step ➤ YN0000: └ Completed ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 10s 934ms

✔ Locating custom template: "base" ✔ Initializing directory ✔ Preparing template ✔ Initializing template ⚠ Installing template dependencies ✔ Installing production dependencies ✔ Installing development dependencies ✖ Failed to install modules: ["electron-squirrel-startup"] With output: Command failed with a non-zero return code (1): yarn add electron-squirrel-startup Internal Error: Your application tried to access corepack, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. Required package: corepack (via "corepack/package.json") Required by: /Users/franky/.nvm/versions/node/v18.16.0/lib/node_modules/corepack/dist/ Require stack:

erickzhao commented 1 year ago

Hey Franky, thanks for stopping by the issue tracker. I don't think Forge works with Yarn PnP. We typically use Yarn 1 for development and testing.