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

Missing check for dev dependencies #9

Open
harryi3t opened this issue Oct 31, 2019 · 0 comments
Open

Missing check for dev dependencies #9

harryi3t opened this issue Oct 31, 2019 · 0 comments

Comments

@harryi3t
Copy link

I am using the latest version of electron-packager (14.x) which now uses galactus which internally uses flora-colossus
Since the logic for doing the prune was not there before in electron-packager, I was doing the pruning myself. After bumping to latest electron-packager it started crashing with error Failed to locate module...

After doing some digging, I found this code in Walker~walkDependenciesForModuleInModule

if (!discoveredPath && depType !== DepType.OPTIONAL && depType !== DepType.DEV_OPTIONAL) {

Also, I checked valid values of depType, they were

PROD, DEV, OPTIONAL, DEV_OPTIONAL and ROOT

And for all the dev dependencies that I have, the value of depType was always 1 (DEV) for which there is no check

So, should the condition be the following instead?

if (!discoveredPath && depType !== DepType.DEV && .....) {

For me, the workaround was to stop doing the pruning myself so that discoveredPath would be truthy and it won't go in that conditional block.

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

No branches or pull requests

1 participant