Skip to content
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

package.json local paths are not supported #3238

Open
3 tasks done
mmarczell-graphisoft opened this issue May 19, 2023 · 2 comments
Open
3 tasks done

package.json local paths are not supported #3238

mmarczell-graphisoft opened this issue May 19, 2023 · 2 comments
Labels

Comments

@mmarczell-graphisoft
Copy link

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.1.1

Electron version

v24.3.0

Operating system

macOS 13.3.1

Last known working Electron Forge version

No response

Expected behavior

npx electron-forge make succeeds.

Actual behavior

It outputs an error message saying

An unhandled rejection has occurred inside Forge:
Error: ENOENT: no such file or directory, stat '/private/var/folders/4c/w1bj9h4d5_df436ckn8xxmqr0000gq/T/electron-packager/darwin-x64/BIMx-darwin-x64-bvme29/Electron.app/Contents/Resources/app/node_modules/connector'

Steps to reproduce

Have a dependency in package.json specified by a relative path like this: (see npm docs)

"dependencies": {
    "foo": "file:../../foo/foo.node"
}

Run npx electron-forge make.

Additional information

No response

@himself65
Copy link

anyupdate?

@erickzhao erickzhao added the bug label Jun 14, 2023
@1j01
Copy link

1j01 commented Apr 20, 2024

I'm trying to reuse code between web and desktop. This, to me, is Electron's core value proposition.
I have created a monorepo setup to facilitate this:

  • /
    • package.json (would use npm workspaces but Electron Forge doesn't support it)
    • core/
      • package.json
    • desktop-app/
      • package.json (includes ../core as a dependency)
    • website/ (includes a demo of the library, which is basically the full app embedded in a webpage)
      • package.json

Packaging with a relative path dependency works on Windows, but fails on macOS and Linux.

As of @electron-forge/cli@7.4.0, the error is swallowed, and the CLI exits unceremoniously. In previous versions, the error showed up when the CLI exited. The error can be surfaced on 7.4.0 by using DEBUG=electron-packager.

@erickzhao erickzhao removed the bug label Jan 31, 2025
@erickzhao erickzhao added the bug label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants