material-design-lite icon indicating copy to clipboard operation
material-design-lite copied to clipboard

v1.1.0 and newer make electron squirrel windows installer fail

Open GitMurf opened this issue 3 years ago • 3 comments

Bugs

Please include the following information with your bug report:

What MDL Version are you using? (please be specific, e.g. major.minor.patch)

v1.1.0 or newer

What browser(s) is this bug affecting (including version)?

Electron app build

What OS (and version) are you using?

windows 10

What are the steps to reproduce the bug? Can you create a plunker/codepen/jsfiddle which reproduces it?

When making an installer package using windows squirrel via electron forge, the installer fails when a user tries to install the electron application on their windows device. The only log that is found is in the app data / local / electron app folder in the file debug.log and it leaves just a single error which is very ambiguous: FATAL:v8_initializer.cc(414)] Error loading V8 startup snapshot file

MDL is a dependency of Firebase’s firebaseui package which is why I need to use this instead of the newer Material Components for the web. Unless it is supposed to be backwards compatible and would work in place of MDL?

GitMurf avatar Jan 13 '22 20:01 GitMurf

Ok so on the right is the node_modules in the appdata/local/...electron app folder after a failed install. The left is the actual build package output from the npm run make that is stored in the out folder (next to the squirrel installer). Notice the modules just stop right at the material design lite item in the failed installer.

Pasted image 20220113132530

GitMurf avatar Jan 13 '22 22:01 GitMurf

Here is comparison of the files in the material folder. Left is the full build, the right is the failed installation. Looks like the "gulpfile.babel.js" is where is pukes... assuming it is working alphabetically.

Pasted image 20220113140842

GitMurf avatar Jan 13 '22 22:01 GitMurf

Here is the ultimate problem and then the manual workaround solution we came up with:

The ultimate solution in the end was to delete the mdl-template-android-dot-com.zip file in the \node_modules\material-design-lite\dist folder. Remember that since it is installed as a dependency, the package may actually be in multiple places. So it might be in both the root node_modules folder of the repo along with in the \node_modules\firebaseui\node_modules\material-design-list\... folder. Or it may only be in one or the other. Change it everywhere.

  • Install [[NPM.firebaseui]] to get the latest version npm install firebase firebaseui --save
  • Now run an npm i on the entire repo to install everything from scratch
  • Go into the node_modules folder and find the [[NPM.material-design-lite]] package and open the dist sub folder and delete the mdl-template-android-dot-com.zip zip package.
  • Now fun npm run make and then the [[Electron.Forge.Squirrel.Windows]] installer should work once complete!
  "dependencies": {
    "electron-squirrel-startup": "^1.0.0",
    "firebase": "^9.6.3",
    "firebaseui": "^6.0.0",
    "googleapis": "^92.0.0",
    "realm": "^10.11.0"
  },

GitMurf avatar Apr 14 '22 01:04 GitMurf