trodi / electron-splashscreen

Simple splashscreen for electron applications.
MIT License
170 stars 29 forks source link

error in electron packaging #14

Closed MarwaAbuEssa closed 6 years ago

MarwaAbuEssa commented 6 years ago

hi, i'm using your splashscreen in my electron project and after packaging it , when i try to run it , it gives me an error that can't find module "@trodi/electron-splashscreen" the code i'm using to import your module is

const Splashscreen = require('@trodi/electron-splashscreen') and the command for electron packaging is : electron-packager . --no-prune --ignore=/node_modules --ignore=/src --overwrite

any help please ?

Marwa

trodi commented 6 years ago

This is an issue with how you are telling electron-packager to package your app. One issue is that you are telling electron-packager to ignore the whole node_modules folder (--ignore=/node_modules). electron-splashscreen is installed in your node_modules folder just like all other npm packages, so you aren't packaging the dependency. Another note: you are using no-prune which 1) doesn't have any affect since you are ignoring node_modules/ and 2) will package all your dev dependencies which isn't something you normally should do.

Be sure to read the electron-packager docs and look at their examples for a better understanding.

Hope this helps.