You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Electron run/build process fails with the Browserlist: caniuse-lite is outdated. Please run next command 'npm update'. Running the npm update command doesn't fix the issue. The application completely breaks even when using npm run dev which worked before.
RESOLUTION
It is due to the Browserlist package emitting an unexpected error message that breaks the build process in server-express.js in Start():
// add webpack middleware to express// also add the hot module reloading middlewareconstinstance=wpack_mid(compiler,{// logLevel: 'silent', // turns off [wdm] messagespublicPath: webConfig.output.publicPath,stats: 'errors-only'// see https://webpack.js.org/configuration/stats/});/** BOOM! **/app.use(instance);app.use(wpack_hot(compiler));
This is a dumb error to force people to update browserlist. To troubleshoot issues of this nature:
Looked through package-lock.json to find which installed packages use browserlist as a dependency. In our case, it was @babel/preset-env which was loading v7.6.2.
Updated package.json to use the latest patch in the 7.6.x line, which is 7.6.4
Do an npm install to regenerate package-lock.json
See if it works using npm run dev, npm run electron
See if the packaged version works with npm run package followed by npm run appsign finally npm run app
TO TEST
Pull the merge request
`nvm use
npm ci
npm run dev and see if app works
npm run electron and see if it works
npm run package and npm run appsign to see if it works
npm run app or double-click the app to see if it works
ADDITIONAL NOTES
This merge request also updates .nvmrc to require node v10.20.1, the latest patch in the Node 10 line.
The text was updated successfully, but these errors were encountered:
In GitLab by @daveseah on Apr 17, 2020, 16:29
Merges why-fix-package -> why
THE ISSUE
The Electron run/build process fails with the
Browserlist: caniuse-lite is outdated. Please run next command 'npm update'
. Running thenpm update
command doesn't fix the issue. The application completely breaks even when usingnpm run dev
which worked before.RESOLUTION
It is due to the Browserlist package emitting an unexpected error message that breaks the build process in
server-express.js
inStart()
:This is a dumb error to force people to update browserlist. To troubleshoot issues of this nature:
package-lock.json
to find which installed packages use browserlist as a dependency. In our case, it was@babel/preset-env
which was loading v7.6.2.package.json
to use the latest patch in the7.6.x
line, which is7.6.4
npm install
to regeneratepackage-lock.json
npm run dev
,npm run electron
npm run package
followed bynpm run appsign
finallynpm run app
TO TEST
npm ci
npm run dev
and see if app worksnpm run electron
and see if it worksnpm run package
andnpm run appsign
to see if it worksnpm run app
or double-click the app to see if it worksADDITIONAL NOTES
This merge request also updates
.nvmrc
to require node v10.20.1, the latest patch in the Node 10 line.The text was updated successfully, but these errors were encountered: