I have a problem when package my application.
I have an error message "WARNING: Found 'electron' but not as a devDependency, pruning anyway". Yet electron is good in the devDependency like this :
"devDependencies": {
"@angular/cli": "~1.7.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"electron": "^1.8.4",
"electron-icon-maker": "0.0.4",
"electron-packager": "^12.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
> electron-packager . --overwrite --out=release --ignore=e2e/ --platform=darwin --arch=x64
Packaging app for platform darwin x64 using electron v1.8.4
WARNING: Found 'electron' but not as a devDependency, pruning anyway
Wrote new app to release/Rekord-darwin-x64
I use npm (instead yarn like electron-builder) :
> node -v && npm -version
v6.10.3
5.7.1
Thanks for your reply,
sebast1
馃憢 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.
That's a warning, not an error. Could you provide the dependencies as well?
Since the original issue reporter has not responded to the request for additional information in about two weeks, it's assumed that they either found the answer in another manner or decided not to pursue this issue. If this is incorrect, they can respond with answers to the questions posed, and this issue can be reopened.
@malept I get the same warning and my dependencies are:
"electron": "2.0.0",
"find-process": "1.1.1",
"request": "2.86.0",
"url-join": "4.0.0"
Additionally, I don't understand the warning. Why should electron be a devDependency? Shouldn't it be a regular dependency?
electron should be under devDependencies, not dependencies.
@malept Why is that? Isn't electron required at runtime?
@pushkin- Electron Packager bundles Electron into your app, so you don't need the NPM dependency.
Thank you. I had the same issue. Solved it now.
How did you solve it?
Move the electron dependency from dependencies to devDependencies.
Most helpful comment
@pushkin- Electron Packager bundles Electron into your app, so you don't need the NPM dependency.