fix: installer compilation (#5908)
For some reason typescript can't find electron types when using nested tsconfig - workaround the bug. Drive-by: surface installer compilation problems.
This commit is contained in:
parent
172de4082a
commit
ec6453d1b2
|
|
@ -21,8 +21,11 @@ const {execSync} = require('child_process');
|
||||||
|
|
||||||
console.log(`Rebuilding installer...`);
|
console.log(`Rebuilding installer...`);
|
||||||
try {
|
try {
|
||||||
execSync('npm run tsc-installer');
|
execSync('npm run tsc-installer', {
|
||||||
|
stdio: ['inherit', 'inherit', 'inherit'],
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Downloading browsers...`);
|
console.log(`Downloading browsers...`);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export function makeWaitForNextTask() {
|
||||||
// As of Mar 2021, Electorn v12 doesn't create new task with `setImmediate` despite
|
// As of Mar 2021, Electorn v12 doesn't create new task with `setImmediate` despite
|
||||||
// using Node 14 internally, so we fallback to `setTimeout(0)` instead.
|
// using Node 14 internally, so we fallback to `setTimeout(0)` instead.
|
||||||
// @see https://github.com/electron/electron/issues/28261
|
// @see https://github.com/electron/electron/issues/28261
|
||||||
if (process.versions.electron)
|
if ((process.versions as any).electron)
|
||||||
return (callback: () => void) => setTimeout(callback, 0);
|
return (callback: () => void) => setTimeout(callback, 0);
|
||||||
if (parseInt(process.versions.node, 10) >= 11)
|
if (parseInt(process.versions.node, 10) >= 11)
|
||||||
return setImmediate;
|
return setImmediate;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue