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

electron-packager 12 doesn't prune scoped packages in devDependencies #888

Closed
3 tasks done
mnquintana opened this issue Sep 11, 2018 · 2 comments
Closed
3 tasks done

Comments

@mnquintana
Copy link

mnquintana commented Sep 11, 2018

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

Please describe your issue:

Steps to reproduce:

  1. Add a scoped package as a devDependency in package.json (e.g. @felixrieseberg/electron-prebuilt-compile)
  2. Run electron-packager with pruning enabled (command below 👇)
  3. asar extract your app.asar file in the output app bundle
  4. Open node_modules in the newly extracted app.asar folder

Expected: There is no scoped package folder (e.g. @felixrieseberg)
Actual: There is a scoped package folder (e.g. @felixrieseberg)

We haven't had this issue with electron-packager 11 – I was able to repro with electron-packager@12.1.1.

Let me know if there's any more info I could provide that'd be helpful! 🙇

Console output when you run electron-packager with the environment variable DEBUG=electron-packager. Please include the stack trace if one exists.

  electron-packager Electron Packager 12.1.1
  electron-packager Node v9.11.1
  electron-packager Host Operating system: darwin (x64) +0ms
  electron-packager Packager Options: {"_":[".","Repro"],"deref-symlinks":true,"derefSymlinks":true,"download":{"strictSSL":true},"prune":true,"platform":"darwin","arch":"x64","overwrite":true,"dir":".","name":"Repro","protocols":[]} +2ms
  electron-packager Target Platforms: darwin +0ms
  electron-packager Target Architectures: x64 +0ms
  electron-packager Inferring appVersion from version in /Users/mnquintana/code/electron-minimal-repro/package.json +0ms
  electron-packager Inferring target Electron version from electron in /Users/mnquintana/code/electron-minimal-repro/package.json +3ms
  electron-packager Application name: Repro +19ms
  electron-packager Target Electron version: 2.0.0 +0ms
  electron-packager Ignored path regular expressions: [ '/\\.git($|/)', '/node_modules/\\.bin($|/)', '\\.o(bj)?$' ] +0ms
  electron-packager Downloading Electron with options {"strictSSL":true,"platform":"darwin","arch":"x64","version":"2.0.0"} +0ms
  electron-packager Removing /Users/mnquintana/code/electron-minimal-repro/Repro-darwin-x64 due to setting overwrite: true +194ms
Packaging app for platform darwin x64 using electron v2.0.0
  electron-packager Creating /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64-template +40ms
  electron-packager Extracting /Users/mnquintana/.electron/electron-v2.0.0-darwin-x64.zip to /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64-template +0ms
  electron-packager Initializing app in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64 from /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64-template template +0ms
  electron-packager Ignored paths based on the out param: [ '/Users/mnquintana/code/electron-minimal-repro/Repro-darwin-x64',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-linux-ia32',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-linux-x64',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-linux-armv7l',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-linux-arm64',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-linux-mips64el',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-mas-x64',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-win32-ia32',
  '/Users/mnquintana/code/electron-minimal-repro/Repro-win32-x64' ] +2s
  electron-packager Renaming Electron to Repro in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/MacOS +303ms
  electron-packager Renaming Electron Helper to Repro Helper in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS +1ms
  electron-packager Renaming Electron Helper EH to Repro Helper EH in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/Frameworks/Electron Helper EH.app/Contents/MacOS +0ms
  electron-packager Renaming Electron Helper NP to Repro Helper NP in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/Frameworks/Electron Helper NP.app/Contents/MacOS +1ms
  electron-packager Renaming Electron Helper.app to Repro Helper.app in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/Frameworks +0ms
  electron-packager Renaming Electron Helper EH.app to Repro Helper EH.app in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/Frameworks +0ms
  electron-packager Renaming Electron Helper NP.app to Repro Helper NP.app in /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64/Electron.app/Contents/Frameworks +0ms
  electron-packager Moving /var/folders/sw/wjgx7d311hs7yctm78pcvz0c0000gn/T/electron-packager/darwin-x64/Repro-darwin-x64 to /Users/mnquintana/code/electron-minimal-repro/Repro-darwin-x64 +1ms
Wrote new app to /Users/mnquintana/code/electron-minimal-repro/Repro-darwin-x64

What command line arguments are you passing? Alternatively, if you are using the API, what
parameters are you passing to the packager() function?

electron-packager . Repro --platform=darwin --arch=x64 --overwrite

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-quick-start
is a good starting point.

https://github.com/mnquintana/electron-minimal-repro/tree/electron-packager-12-prune-bug

@welcome
Copy link

welcome bot commented Sep 11, 2018

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@malept
Copy link
Member

malept commented Sep 12, 2018

Thanks for the detailed bug report! I have a fix in #889.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants