Moray
Moray
Explore posts from servers
PPrisma
Created by Moray on 8/19/2024 in #help-and-questions
Why are client files generated in node_modules and what does that mean for production builds?
Phew, thanks!
8 replies
PPrisma
Created by Moray on 8/19/2024 in #help-and-questions
Why are client files generated in node_modules and what does that mean for production builds?
Prisma 1 wasn't perfect but at least it was consistent
8 replies
PPrisma
Created by Moray on 8/19/2024 in #help-and-questions
Why are client files generated in node_modules and what does that mean for production builds?
So I can now be in a position where my two app servers are accessing data in different ways
8 replies
PPrisma
Created by Moray on 8/19/2024 in #help-and-questions
Why are client files generated in node_modules and what does that mean for production builds?
Funnily enough I've just run into this exact issue. I have a self-referential relationship on a table and if I change the name of one end of the relation, when I regenerate the files the ends of the relationship swap over. ARRRRRRRRGGHHHH
8 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
OK I think I've figured it out. If I remove prisma-upgrade from my devDependencies then it works. Not sure why it was interfering with installing the main packages but at least that unblocks me!
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
No, I get the same error message
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
It seems odd that it's an issue in Prisma 3 and Prisma 5.
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
Because it's baked into the package install process, I'm not really sure what I can do about it at my end
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
I've tried downloading the file at on several browsers and it definitely doesn't exist. https://binaries.prisma.sh/all_commits/e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e/rhel-openssl-3.0.x/introspection-engine.gz
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
The server is running in AWS eu-west-2a, so I would be VERY surprised if it's a connection issue.
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
@RaphaelEtim at the suggestion of your AI assistant I upgraded to Prisma 5, but that still won't install on AL2023
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
What is this file for? Can I build it myself instead of relying on someone else to provide it?
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
Obviously the file its trying to download doesn't exist
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
Something very weird is going on with this, I've just tried setting up a fresh AL2023 server. I'm getting the same error but unlike my other servers now the install completely fails and nothing prisma-related works
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
@RaphaelEtim any news on this?
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
It seems to only be showing the error for @prisma/sdk as queries from my application using Prisma are working fine!
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
[5/5] Building fresh packages...
error /var/app/redacted/node_modules/@prisma/sdk: Command failed.
Exit code: 1
Command: node scripts/download.js
Arguments:
Directory: /var/app/redacted/node_modules/@prisma/sdk
Output:
version: e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^

Error: Not Found https://binaries.prisma.sh/all_commits/e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e/rhel-openssl-3.0.x/introspection-engine.gz
at p_retry_1.default.retries (/var/app/redacted/node_modules/@prisma/fetch-engine/dist/downloadZip.js:45:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RetryOperation._fn (/var/app/redacted/node_modules/p-retry/index.js:50:12) {
attemptNumber: 3,
retriesLeft: 0
}
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[5/5] Building fresh packages...
error /var/app/redacted/node_modules/@prisma/sdk: Command failed.
Exit code: 1
Command: node scripts/download.js
Arguments:
Directory: /var/app/redacted/node_modules/@prisma/sdk
Output:
version: e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^

Error: Not Found https://binaries.prisma.sh/all_commits/e11114fa1ea826f9e7b4fa1ced34e78892fe8e0e/rhel-openssl-3.0.x/introspection-engine.gz
at p_retry_1.default.retries (/var/app/redacted/node_modules/@prisma/fetch-engine/dist/downloadZip.js:45:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RetryOperation._fn (/var/app/redacted/node_modules/p-retry/index.js:50:12) {
attemptNumber: 3,
retriesLeft: 0
}
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21 replies
PPrisma
Created by Moray on 11/23/2024 in #help-and-questions
Amazon Linux 2023 support
Hi @RaphaelEtim , thanks for getting back to me. I'm running on x86_64, not ARM64
21 replies
PPrisma
Created by Moray on 8/23/2024 in #help-and-questions
Introspecting an existing database doesn't handle join tables correctly
For info, this is what the existing _RoleToTenantUser table looks like:
CREATE TABLE `_RoleToTenantUser` (
`A` char(25) CHARACTER SET utf8 NOT NULL,
`B` char(25) CHARACTER SET utf8 NOT NULL,
UNIQUE KEY `RoleToTenantUser_AB_unique` (`A`,`B`),
KEY `B` (`B`),
CONSTRAINT `_RoleToTenantUser_ibfk_1` FOREIGN KEY (`A`) REFERENCES `Role` (`id`) ON DELETE CASCADE,
CONSTRAINT `_RoleToTenantUser_ibfk_2` FOREIGN KEY (`B`) REFERENCES `TenantUser` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
CREATE TABLE `_RoleToTenantUser` (
`A` char(25) CHARACTER SET utf8 NOT NULL,
`B` char(25) CHARACTER SET utf8 NOT NULL,
UNIQUE KEY `RoleToTenantUser_AB_unique` (`A`,`B`),
KEY `B` (`B`),
CONSTRAINT `_RoleToTenantUser_ibfk_1` FOREIGN KEY (`A`) REFERENCES `Role` (`id`) ON DELETE CASCADE,
CONSTRAINT `_RoleToTenantUser_ibfk_2` FOREIGN KEY (`B`) REFERENCES `TenantUser` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
And this is what Prisma generated for this table in prisma/migrations/0_init/migration.sql:
CREATE TABLE `_RoleToTenantUser` (
`A` CHAR(25) NOT NULL,
`B` CHAR(25) NOT NULL,

UNIQUE INDEX `_RoleToTenantUser_AB_unique`(`A`, `B`),
INDEX `_RoleToTenantUser_B_index`(`B`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `_RoleToTenantUser` ADD CONSTRAINT `_RoleToTenantUser_A_fkey` FOREIGN KEY (`A`) REFERENCES `Role`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `_RoleToTenantUser` ADD CONSTRAINT `_RoleToTenantUser_B_fkey` FOREIGN KEY (`B`) REFERENCES `TenantUser`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
CREATE TABLE `_RoleToTenantUser` (
`A` CHAR(25) NOT NULL,
`B` CHAR(25) NOT NULL,

UNIQUE INDEX `_RoleToTenantUser_AB_unique`(`A`, `B`),
INDEX `_RoleToTenantUser_B_index`(`B`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `_RoleToTenantUser` ADD CONSTRAINT `_RoleToTenantUser_A_fkey` FOREIGN KEY (`A`) REFERENCES `Role`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `_RoleToTenantUser` ADD CONSTRAINT `_RoleToTenantUser_B_fkey` FOREIGN KEY (`B`) REFERENCES `TenantUser`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
3 replies
PPrisma
Created by Moray on 8/16/2024 in #help-and-questions
Upgrading from Prisma 1
Going to have to apply a few preliminary database changes so that it understands which relationships are 1-many and which are many-many
7 replies