https://cal.com logo
#api
Title
k

Krishna Raj

07/26/2022, 6:39 AM
馃憢 Hello team. I am trying to build api module inside docker and get an error like this. Am i missing a dependency module ?
Copy code
Command is: `RUN yarn workspace @calcom/api build
Copy code
Step 20/37 : RUN yarn workspace @calcom/api build
 ---> Running in bc5aa4b8127b
yarn workspace v1.22.19
yarn run v1.22.19
$ next build
warn  - You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: <https://nextjs.org/docs/messages/non-standard-node-env>
warn - axiom: Envvars not detected. If this is production please see <https://github.com/axiomhq/next-axiom> for help
warn - axiom: Sending Web Vitals to /dev/null
warn - axiom: Sending logs to console
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
<https://nextjs.org/telemetry>

info  - Linting and checking validity of types...

Failed to compile.

./pages/api/attendees/[id].ts
1:1  Error: Delete `import路type路{路NextApiRequest,路NextApiResponse路}路from路"next";鈴庘弾`  prettier/prettier
5:9  Error: Replace `路schemaAttendeeEditBodyParams,路schemaAttendeeReadPublic路` with `鈴幝仿穝chemaAttendeeEditBodyParams,鈴幝仿穝chemaAttendeeReadPublic,鈴巂  prettier/prettier
9:56  Error: Insert `t";鈴巌mport路type路{路NextApiRequest,路NextApiResponse路}路from路"nex`  prettier/prettier
120:14  Error: Replace `.status(400)` with `鈴幝仿仿仿仿仿仿仿仿仿仿仿.status(400)鈴幝仿仿仿仿仿仿仿仿仿仿仿穈  prettier/prettier
180:56  Error: Replace `withValidQueryIdTransformParseInt(attendeeById)` with `鈴幝仿穡ithValidQueryIdTransformParseInt(attendeeById)鈴巂  prettier/prettier

./pages/api/attendees/index.ts
1:1  Error: Delete `import路type路{路NextApiRequest,路NextApiResponse路}路from路"next";鈴庘弾`  prettier/prettier
5:9  Error: Replace `路schemaAttendeeCreateBodyParams,路schemaAttendeeReadPublic路}路from路"@lib/validations/attendee` with `鈴幝仿穝chemaAttendeeCreateBodyParams,鈴幝仿穝chemaAttendeeReadPublic,鈴巬路from路"@lib/validations/attendee";鈴巌mport路type路{路NextApiRequest,路NextApiResponse路}路from路"next`  prettier/prettier
24:39  Error: Replace `路schemaAttendeeReadPublic.parse(attendee)` with `鈴幝仿仿仿仿仿穝chemaAttendeeReadPublic.parse(attendee)鈴幝仿仿仿穈  prettier/prettier
89:10  Error: Replace `.status(400)` with `鈴幝仿仿仿仿仿仿仿.status(400)鈴幝仿仿仿仿仿仿仿穈  prettier/prettier
101:55  Error: Replace `.map((booking:路{路id:路number路})路=>路booking.id)` with `鈴幝仿仿仿仿仿仿仿.map((booking:路{路id:路number路})路=>路booking.id)鈴幝仿仿仿仿仿仿仿穈  prettier/prettier

./pages/api/availabilities/[id].ts
1:1  Error: Delete `import路type路{路NextApiRequest,路NextApiResponse路}路from路"next";鈴庘弾`  prettier/prettier
13:1  Error: Insert `import路type路{路NextApiRequest,路NextApiResponse路}路from路"next";鈴巂  prettier/prettier
20:8  Error: Replace `.status(400)` with `鈴幝仿仿仿仿仿.status(400)鈴幝仿仿仿仿仿穈  prettier/prettier
25:53  Error: Insert `鈴幝仿仿穈  prettier/prettier
57:16  Error: Replace `.status(404).json({路mess
Trying my luck here bubbling this up again 馃檪
a

Agusti

07/27/2022, 5:48 PM
Hey @Krishna Raj Thanks for bringing this up, will take a look and get back at you once this is fixed, just to be sure, could you let me know your branch (is it main or prod?) in api submodule? Thanks
k

Krishna Raj

07/27/2022, 5:54 PM
@Agusti I tried few branches and few commit heads. Still no luck. Can u pls give me link to the commit in github and i will try now ?
a

Agusti

07/27/2022, 5:55 PM
Let me look into it because it seems since the latest nextjs upgrade our types extension for nextapirequest is not being taken into account and other (not prettier) type issues come up on build, will look into it and fix it ASAP. Will let you know here once this is fixed, on the meantime can you try using api with
yarn dev
instead?
k

Krishna Raj

07/27/2022, 6:00 PM
Sure, yarn dev works for me. However, I need to take this to my aws via docker in Prod. Have my self hosting licence. So would appreciate a fix sooner 馃檪
thank you for getting back to me. I am a backend person and I was going nuts 馃檪
a

Agusti

07/27/2022, 6:01 PM
Hey no problem, @Krishna Raj I will try to either get it fixed today, or get the latest commit/branch without breaking so you can do that instead
This was introduced on latest nextjs upgrade AFAIK, but I need to dig a little further to be sure / fix it without a downgrade
k

Krishna Raj

07/27/2022, 6:02 PM
ok. I happy to accept either solution, you folks are the experts 馃檪
@zomars Hi! Do you have context and perhaps an update on this issue ?
2 Views