https://cal.com logo
k

KapilDev Neupane

03/07/2022, 12:11 AM
Hi guys! I am new here. Don't know if this is the right channel but I am having issues running the Cal source code locally in my Laptop. My PC is Windows 11, Node Version is v14.19.0. I have latest version Docker installed. When running
yarn
I get the following error:
Copy code
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
[-/14] ⠄ waiting...
[-/14] ⠄ waiting...
[14/14] ⡀ @calcom/prisma
[-/14] ⡀ waiting...
error C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\@calcom\prisma: Command failed.
Exit code: 1
Command: yarn generate-schemas
Arguments:
Directory: C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\@calcom\prisma
Output:
yarn run v1.22.17
$ prisma generate && prisma format
internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\node_modules\prisma\build\index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
error Command failed with exit code 1.
When running
yarn dx
I get the following error:
Copy code
yarn run v1.22.17
$ turbo run dx
• Packages in scope: @calcom/config, @calcom/docs, @calcom/lib, @calcom/prisma, @calcom/tsconfig, @calcom/types, @calcom/ui, @calcom/web
• Running dx in 8 packages
@calcom/prisma:dx: cache miss, executing a66f0ef6f6e319c4
@calcom/prisma:dx: $ yarn db-setup
@calcom/prisma:dx: $ run-s db-up db-deploy db-seed
@calcom/prisma:dx: $ docker-compose up -d
@calcom/prisma:dx: Container prisma-postgres-1  Recreate
@calcom/prisma:dx: Container prisma-postgres-1  Recreated
@calcom/prisma:dx: Container prisma-postgres_is_ready-1  Recreate
@calcom/prisma:dx: Container prisma-postgres_is_ready-1  Recreated
@calcom/prisma:dx: Container prisma-postgres-1  Starting
@calcom/prisma:dx: Container prisma-postgres-1  Started
@calcom/prisma:dx: Container prisma-postgres_is_ready-1  Starting
@calcom/prisma:dx: Container prisma-postgres_is_ready-1  Started
@calcom/prisma:dx: $ yarn prisma migrate deploy
@calcom/prisma:dx: $ C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\.bin\prisma migrate deploy
@calcom/prisma:dx: Environment variables loaded from .env
@calcom/prisma:dx: Prisma schema loaded from schema.prisma
@calcom/prisma:dx: Datasource "db": PostgreSQL database "calendso", schema "public" at "localhost:5450"
@calcom/prisma:dx:
@calcom/prisma:dx: 72 migrations found in prisma/migrations
@calcom/prisma:dx:
@calcom/prisma:dx:
@calcom/prisma:dx: No pending migrations to apply.
@calcom/prisma:dx: $ yarn prisma db seed
@calcom/prisma:dx: $ C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\.bin\prisma db seed
@calcom/prisma:dx: Environment variables loaded from .env
@calcom/prisma:dx: Running seed command `ts-node ./seed.ts` ...
@calcom/prisma:dx: 👤 Upserted 'delete-me' with email "<mailto:delete-me@example.com|delete-me@example.com>" & password "delete-me". Booking page 👉 undefined/delete-me
@calcom/prisma:dx: 👤 Upserted 'onboarding' with email "<mailto:onboarding@example.com|onboarding@example.com>" & password "onboarding". Booking page 👉 undefined/onboarding
@calcom/prisma:dx: 👤 Upserted 'free-first-hidden' with email "<mailto:free-first-hidden@example.com|free-first-hidden@example.com>" & password "free-first-hidden". Booking page 👉 undefined/free-first-hidden
@calcom/prisma:dx:      📆 Event type 30min already seems seeded - undefined/free-first-hidden/30min
@calcom/prisma:dx:      📆 Event type 60min already seems seeded - undefined/free-first-hidden/60min
@calcom/prisma:dx: 👤 Upserted 'pro' with email "<mailto:pro@example.com|pro@example.com>" & password "pro". Booking page 👉 undefined/pro
@calcom/prisma:dx:      📆 Event type 30min already seems seeded - undefined/pro/30min
@calcom/prisma:dx:      📆 Event type 60min already seems seeded - undefined/pro/60min
@calcom/prisma:dx:      📆 Event type paid already seems seeded - undefined/pro/paid
@calcom/prisma:dx: 👤 Upserted 'trial' with email "<mailto:trial@example.com|trial@example.com>" & password "trial". Booking page 👉 undefined/trial
@calcom/prisma:dx:      📆 Event type 30min already seems seeded - undefined/trial/30min
@calcom/prisma:dx:      📆 Event type 60min already seems seeded - undefined/trial/60min
@calcom/prisma:dx: 👤 Upserted 'free' with email "<mailto:free@example.com|free@example.com>" & password "free". Booking page 👉 undefined/free
@calcom/prisma:dx:      📆 Event type 30min already seems seeded - undefined/free/30min
@calcom/prisma:dx:      📆 Event type 60min already seems seeded - undefined/free/60min
@calcom/prisma:dx: 👤 Upserted 'usa' with email "<mailto:usa@example.com|usa@example.com>" & password "usa". Booking page 👉 undefined/usa
@calcom/prisma:dx:      📆 Event type 30min already seems seeded - undefined/usa/30min
@calcom/prisma:dx: 👤 Upserted 'teamfree' with email "<mailto:teamfree@example.com|teamfree@example.com>" & password "teamfree". Booking page 👉 undefined/teamfree
@calcom/prisma:dx: 👤 Upserted 'teampro' with email "<mailto:teampro@example.com|teampro@example.com>" & password "teampro". Booking page 👉 undefined/teampro
@calcom/prisma:dx: Team 'Seeded Team' already exists, skipping.
@calcom/prisma:dx:
@calcom/prisma:dx: The seed command has been executed.
@calcom/web:dx: cache miss, executing a89e0cd2750bcf8c
@calcom/web:dx: $ next dev
@calcom/web:dx: Error: listen EACCES: permission denied 0.0.0.0:3000
@calcom/web:dx:     at Server.setupListenHandle [as _listen2] (net.js:1314:21)
@calcom/web:dx:     at listenInCluster (net.js:1379:12)
@calcom/web:dx:     at Server.listen (net.js:1465:7)
@calcom/web:dx:     at C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\next\dist\server\lib\start-server.js:45:16
@calcom/web:dx:     at new Promise (<anonymous>)
@calcom/web:dx:     at Object.startServer (C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\next\dist\server\lib\start-server.js:19:12)
@calcom/web:dx:     at nextDev (C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\next\dist\cli\next-dev.js:116:23)
@calcom/web:dx:     at C:\Users\Kapildev\VSCodeProjects\<http://cal.com|cal.com>\node_modules\next\dist\bin\next:130:34 {
@calcom/web:dx:   code: 'EACCES',
@calcom/web:dx:   errno: -4092,
@calcom/web:dx:   syscall: 'listen',
@calcom/web:dx:   address: '0.0.0.0',
@calcom/web:dx:   port: 3000
@calcom/web:dx: }
@calcom/web:dx: error Command failed with exit code 1.
@calcom/web:dx: info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
@calcom/web:dx: Error: command finished with error: exit status 1
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
If you think the port is already in use in Host machine from above message, then the answer is no. I checked it with the following command:
netstat -ano | findstr :3000
I am currently stuck and could not think of a single way to solve this. What can I do?
z

zomars

03/07/2022, 12:51 AM
Maybe @Ali can provide some insight since he uses windows as well
a

Alex Dowbor

03/07/2022, 12:59 AM
@Gabriel G was this the same issue you were encountering?
a

Ali

03/07/2022, 6:09 AM
@zomars I am facing the same issue regarding
yarn
after one of the recent merges in
main
(possibly over the weekend as it wasn't an issue till Friday evening IST) This was resolved in one of the earlier merges a week or two ago and was working fine, but apparently this has been re-introduced. 🤔
Yeah, this doesn't seem to bode well with Windows apparently. https://github.com/calcom/cal.com/commit/190cc8caf66cb43f3c720fab47c6d20bb1e5fd94#diff-66d13d4dff9ee507bf4ba20bbf[…]d79babdc40c66f42b870d0b8a72c7R19 When I removed this postinstall line, everything worked well. So, we might need to see what is the acceptable equivalent for this on Windows.
d

Demian N

03/07/2022, 1:55 PM
Try to restart NAT.
Copy code
net stop winnat
net start winnat
This might solve your second issue when running
yarn dx
z

zomars

03/07/2022, 3:32 PM
That weird @Ali Can you try changing the postinstall script to something else like
echo "hello world"
to see if the generate-schema is the culprit?
a

Ali

03/08/2022, 4:29 AM
@zomars Yeah,
echo "hello world"
works just fine there. generate-schema is the culprit
When I move to
/packages/prisma/
and then run
yarn generate-schema
from there, it runs just fine and works. 🤷‍♂️
🤔 2
k

KapilDev Neupane

03/08/2022, 9:49 AM
What @Ali suggested solved my problem. Thanks
❤️ 3
🙏 1