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

Unable to build app using Yarn #559

Closed
VBtheFirbolg opened this issue Jan 20, 2022 · 7 comments
Closed

Unable to build app using Yarn #559

VBtheFirbolg opened this issue Jan 20, 2022 · 7 comments
Labels
fix-available A fix to the issue is available in a new version

Comments

@VBtheFirbolg
Copy link

VBtheFirbolg commented Jan 20, 2022

OS: Ubuntu 20.04 LTS

I tried to build the app from the master branch using Yarn, but I am unable to do so. I get an error that states:

• electron-builder  version=22.11.7 os=5.4.0-94-generic
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  ⨯ Cannot find module 'dmg-license'
Require stack:
- /home/user/youtube-music/node_modules/dmg-builder/out/dmgLicense.js
- /home/user/youtube-music/node_modules/dmg-builder/out/dmg.js
- /home/user/youtube-music/node_modules/dmg-builder/out/dmgUtil.js
- /home/user/youtube-music/node_modules/app-builder-lib/out/macPackager.js
- /home/user/youtube-music/node_modules/app-builder-lib/out/packager.js
- /home/user/youtube-music/node_modules/app-builder-lib/out/index.js
- /home/user/youtube-music/node_modules/electron-builder/out/builder.js
- /home/user/youtube-music/node_modules/electron-builder/out/cli/cli.js
- /home/user/youtube-music/node_modules/electron-builder/cli.js  failedTask=build stackTrace=Error: Cannot find module 'dmg-license'
Require stack:
- /home/user/youtube-music/node_modules/dmg-builder/out/dmgLicense.js
- /home/user/youtube-music/node_modules/dmg-builder/out/dmg.js
- /home/user/youtube-music/node_modules/dmg-builder/out/dmgUtil.js
- /home/user/youtube-music/node_modules/app-builder-lib/out/macPackager.js
- /home/user/youtube-music/node_modules/app-builder-lib/out/packager.js
- /home/user/youtube-music/node_modules/app-builder-lib/out/index.js
- /home/user/youtube-music/node_modules/electron-builder/out/builder.js
- /home/user/youtube-music/node_modules/electron-builder/out/cli/cli.js
- /home/user/youtube-music/node_modules/electron-builder/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/user/youtube-music/node_modules/dmg-builder/src/dmgLicense.ts:7:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/user/youtube-music/node_modules/dmg-builder/src/dmg.ts:13:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I am not sure what I must do to prevent this.

@Araxeus
Copy link
Collaborator

Araxeus commented Jan 20, 2022

run first yarn to get all dependencies then yarn build:linux to build only for linux

(seems your problem was trying to build for mac from linux - next time you should also post the command you used)

@VBtheFirbolg
Copy link
Author

Thank you! I do apologise, I am quite new to all this. I will keep what you said in mind!

@Araxeus
Copy link
Collaborator

Araxeus commented Jan 20, 2022

Nothing to apologies for 😃

feel free to ask anything

@VBtheFirbolg
Copy link
Author

I was able to build the app, but the appimage seems to be a bit buggy. For instance, I am unable to integrate it with my system and run it, and the icon seems to be missing in the sidebar when I launch the application. I tried installing the .deb file and it seems to work fine. What details would you have me furnish regarding this?

@VBtheFirbolg VBtheFirbolg reopened this Jan 21, 2022
@Araxeus
Copy link
Collaborator

Araxeus commented Jan 21, 2022

I'm a windows user so don't know about this, hopefully some Linux user could help you

@Xabab
Copy link

Xabab commented Dec 2, 2022

run first yarn to get all dependencies then yarn build:linux to build only for linux

I think the 'Build' readme's section would benefit from clarifying it for those who are unfamiliar with yarn and just copy-paste commands for whatever reason (in my case, not working discord's rich presence in v1.18.0)

@Zo-Bro-23
Copy link
Contributor

run first yarn to get all dependencies then yarn build:linux to build only for linux

I think the 'Build' readme's section would benefit from clarifying it for those who are unfamiliar with yarn and just copy-paste commands for whatever reason (in my case, not working discord's rich presence in v1.18.0)

Done! See #905

@JellyBrick JellyBrick added the fix-available A fix to the issue is available in a new version label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix-available A fix to the issue is available in a new version
Projects
None yet
Development

No branches or pull requests

5 participants