Can not build electron without the internet connection #16465
-
When I use "quasar build -m electron" as CLI command to build the electron for window platform in case with out the internet connection then the error occurred at step 2 of 5 "Resolving packages..." , which it working fine after the internet is connected. My question is can I build the electron mode with out the internet connection? Thanks for advise. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For now, I found the solution by replace dependencies path point to local path (node_modules folder) instead of original value. Add below script to quasar.config.ts in electron section extendPackageJson(pkg) { |
Beta Was this translation helpful? Give feedback.
For now, I found the solution by replace dependencies path point to local path (node_modules folder) instead of original value.
Add below script to quasar.config.ts in electron section
extendPackageJson(pkg) {
const dependencies = pkg.dependencies;
var _newdependenciesString = '{';
for (let obj in dependencies) {
obj =
"${obj}" : "file:..\\\\..\\\\..\\\\node_modules\\\\${obj}"
;_newdependenciesString +=
${obj},
;}
_newdependenciesString = _newdependenciesString.slice(0, -1);
_newdependenciesString += '}';
const _newobj = JSON.parse(_newdependenciesString);
pkg.dependencies = _newobj;
},