Skip to content

Commit 3cc2b8b

Browse files
committed
fix: Heroku build error
1 parent 6fd8630 commit 3cc2b8b

File tree

7 files changed

+11
-16
lines changed

7 files changed

+11
-16
lines changed

core/src/constants.ts

-7
This file was deleted.

core/src/index.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
export { default as constants } from './constants';
2-
export * from './constants';
1+
export const LANGUAGES = ['en', 'fr'] as const;
2+
export const DEFAULT_LANGUAGE = LANGUAGES[0];
3+
export type Language = typeof LANGUAGES[number];
34

4-
export * from './types';
5+
export type PrismaInclude = {
6+
[key: string]: boolean | PrismaInclude;
7+
};

core/src/types.ts

-3
This file was deleted.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"node": "16.13.1"
88
},
99
"scripts": {
10-
"clean": "rimraf \"node_modules\" \"client/build\" \"core/lib\" \"server/node_modules\" \"server/lib\" \"**/tsconfig.tsbuildinfo\"",
10+
"clean": "rimraf \"client/build\" \"core/lib\" \"prisma/lib\" \"server/lib\" \"**/node_modules\" \"**/tsconfig.tsbuildinfo\"",
1111
"compile": "tsc -b tsconfig.build.json",
1212
"front": "npm run start --workspace=client",
1313
"back": "npm run start:watch --workspace=server",
@@ -16,7 +16,7 @@
1616
"db:sync:dev": "npm run db:sync:dev --workspace=server",
1717
"db:sync:prod": "npm run db:sync:prod --workspace=server",
1818
"db:seed": "npm run db:seed --workspace=server",
19-
"postinstall": "bash ./postInstall.sh && npm run compile"
19+
"postinstall": "bash ./postInstall.sh"
2020
},
2121
"devDependencies": {
2222
"concurrently": "^7.6.0",

postInstall.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
if [ "$NODE_ENV" = "production" ]; then
22
npm run db:sync:prod
3+
npm run compile
34
npm run db:seed
45
npm run build --workspace=client
56
else
67
npm run db:sync:dev
8+
npm run compile
79
npm run db:seed
810
fi

server/src/controllers/Users.ts

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const authenticate = (prisma: PrismaClient) => async (
8080

8181
// Return user
8282
res.json(user);
83+
return;
8384
}
8485

8586
throw new Error('Invalid password');

tsconfig.build.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"references": [
44
{ "path": "prisma" },
55
{ "path": "core" },
6-
{ "path": "client" },
76
{ "path": "server" }
87
]
98
}

0 commit comments

Comments
 (0)