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

4.4.0 AppImage and Deb package installation from source - Missing Node module #598

Closed
1 task done
brianrobt opened this issue Sep 15, 2023 · 3 comments · Fixed by #599
Closed
1 task done

4.4.0 AppImage and Deb package installation from source - Missing Node module #598

brianrobt opened this issue Sep 15, 2023 · 3 comments · Fixed by #599
Labels
bug Something isn't working

Comments

@brianrobt
Copy link

🔍 Is there already an issue for your problem?

  • I have checked older issues, open and closed

📝 Description

After cloning the repository and building from source on the "main" branch, I am getting a JS runtime exception for both the AppImage and .deb package.

Error message:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'electron-positioner'
Require stack:
- /tmp/.mount_GitifyZej8vg/resources/app.asar/node_modules/menubar/lib/Menubar.js
- /tmp/.mount_GitifyZej8vg/resources/app.asar/node_modules/menubar/lib/index.js
- /tmp/.mount_GitifyZej8vg/resources/app.asar/main.js
-
    at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/tmp/.mount_GitifyZej8vg/resources/app.asar/node_modules/menubar/lib/Menubar.js:68:45)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)

🪜 Steps To Reproduce

  1. Clone the Git repo.
  2. From the main branch, run pnpm install.
  3. Run npm run build && npm run make:linux.
  4. Run sudo apt install ./dist/gitify_4.4.0_amd64.deb.
  5. Reload your shell and run gitify (observe the error above).
  6. Run ./dist/Gitify-4.4.0.AppImage (observe the error above).

ℹ System Info

❯ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

📸 Screenshots

No response

@brianrobt brianrobt added the bug Something isn't working label Sep 15, 2023
@afonsojramos
Copy link
Member

afonsojramos commented Sep 19, 2023

Interesting... I imagine this has to do with pnpm... I'll check it out! Should be happening in MacOS as well

@afonsojramos
Copy link
Member

So it seems that a electron-builder related package app-builder is not yet compatible with pnpm.

The workaround is the following: electron-userland/electron-builder#6289 (comment)

However, even though this is an issue since 2021, it seems that things are moving and it is closer to be ready for pnpm sooner than we'd think. develar/app-builder#84

So the workaround might not need to live for too long 😄

@brianrobt
Copy link
Author

That did the trick. Thanks @afonsojramos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants