build(postinstall): postinstall script to downgrade typeorm on windows (#836)
* 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
This commit is contained in:
13
postinstall-win.js
Normal file
13
postinstall-win.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/* 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' });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user