* build(postinstall): postinstall script to downgrade typeorm on windows This is a temporary fix for windows baremetal users until we fix #478 re #478 * fix: use win32 as explained in nodejs docs
14 lines
433 B
JavaScript
14 lines
433 B
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const { execSync } = require('child_process');
|
|
|
|
if (process.platform === 'win32') {
|
|
const typeormPath = path.resolve('node_modules/typeorm');
|
|
|
|
if (fs.existsSync(typeormPath)) {
|
|
process.stdout.write('> Installing typeorm@0.3.11 for Windows\n');
|
|
execSync('pnpm add typeorm@0.3.11', { stdio: 'inherit' });
|
|
}
|
|
}
|