From bd95557b980350b2e6d9dfe1433de8d337d220db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joe=CC=88l=20Galeran?= Date: Fri, 28 Apr 2023 10:39:23 +0200 Subject: [PATCH] fix(get-platform): remove x32 in isNodeAPISupported() isNodeAPISupported was added to test the Windwos 32bit node problem https://github.com/prisma/ecosystem-tests/pull/1830/files And it only returns ia32 Note that x32 was removed in Node 16+, see https://github.com/nodejs/node/pull/41905/files#diff-5212ec434ff69f31e0de5e7e6f57abd45d810780c60f05736ab31eae5a395186 --- packages/get-platform/src/isNodeAPISupported.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/get-platform/src/isNodeAPISupported.ts b/packages/get-platform/src/isNodeAPISupported.ts index 91417a342e52..ddce5e9626b0 100644 --- a/packages/get-platform/src/isNodeAPISupported.ts +++ b/packages/get-platform/src/isNodeAPISupported.ts @@ -3,10 +3,10 @@ import fs from 'fs' /** * Determines whether Node API is supported on the current platform and throws if not */ -export function isNodeAPISupported() { +export function isNodeAPISupported(): void { const customLibraryPath = process.env.PRISMA_QUERY_ENGINE_LIBRARY const customLibraryExists = customLibraryPath && fs.existsSync(customLibraryPath) - if (!customLibraryExists && (process.arch === 'x32' || process.arch === 'ia32')) { + if (!customLibraryExists && process.arch === 'ia32') { throw new Error( `The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set \`engineType = "binary"\` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)`, )