mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
🐛 Typescript tsc could not be located when building node in Node-Dev (#918)
* ⚡ Added variation of Typescript executable path based on OS of user * ⚡ indentation fix (removed spaces)
This commit is contained in:
parent
f24afcd86f
commit
6aaae1ef6c
|
@ -63,8 +63,15 @@ export async function createCustomTsconfig () {
|
||||||
export async function buildFiles (options?: IBuildOptions): Promise<string> {
|
export async function buildFiles (options?: IBuildOptions): Promise<string> {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
// Get the path of the TypeScript cli of this project
|
let typescriptPath;
|
||||||
const tscPath = join(__dirname, '../../node_modules/.bin/tsc');
|
|
||||||
|
// Check for OS to designate correct tsc path
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
typescriptPath = '../../node_modules/TypeScript/lib/tsc';
|
||||||
|
} else {
|
||||||
|
typescriptPath = '../../node_modules/.bin/tsc';
|
||||||
|
}
|
||||||
|
const tscPath = join(__dirname, typescriptPath);
|
||||||
|
|
||||||
const tsconfigData = await createCustomTsconfig();
|
const tsconfigData = await createCustomTsconfig();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue