calcom / docker

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
MIT License
619 stars 323 forks source link

Error on `DOCKER_BUILDKIT=0 docker compose build calcom`: Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation) #330

Closed komali2 closed 4 months ago

komali2 commented 4 months ago

I followed the instructions here to the letter: https://github.com/calcom/docker#advanced-users-build-and-run-calcom

At the build step, I run DOCKER_BUILDKIT=0 docker compose build calcom. The output looks fine until:

Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
The command '/bin/sh -c yarn config set httpTimeout 1200000 &&     npx turbo prune --scope=@calcom/web --docker &&     yarn install &&     yarn db-deploy &&     yarn --cwd packages/prisma seed-app-store' returned a non-zero code: 1

Before that is a bunch of installation output I believe, so it seems to be failing on this step:

Step 15/40 : RUN yarn config set httpTimeout 1200000 &&     npx turbo prune --scope=@calcom/web --docker &&     yarn install &&     yarn db-deploy &&     yarn --cwd packages/prisma seed-app-store
 ---> Running in 14dd88597cd0
➤ YN0000: Successfully set httpTimeout to 1200000
npm WARN exec The following package was not found and will be installed: turbo@1.12.4

Yes, the database is running, with docker compose up -d database.

If I try to do docker compose up -d after the above, I get:

caleb@r:/src/calcom-docker$ docker compose up -d calcom
[+] Running 10/11
 ⠸ calcom 10 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulling                                                                                     84.2s 
   ✔ 6a299ae9cfd9 Pull complete                                                                                                               2.6s 
   ✔ e08e8703b2fb Pull complete                                                                                                               1.9s 
   ✔ 68e92d11b04e Pull complete                                                                                                               4.8s 
   ✔ 5b9fe7fef9be Pull complete                                                                                                              12.6s 
   ✔ 278d467c182f Pull complete                                                                                                               3.4s 
   ✔ fc545d3635f7 Pull complete                                                                                                               6.9s 
   ✔ 86e162bf5ca4 Pull complete                                                                                                               5.9s 
   ✔ fd653604fd26 Pull complete                                                                                                               6.6s 
   ✔ 0eeb5f0b2ac8 Pull complete                                                                                                               7.3s 
   ✔ 8a7ef5b8be68 Download complete                                                                                                          30.4s 
[+] Building 0.0s (0/0)                                                                                                             docker:default
network mode "stack" not supported by buildkit - you can define a custom network for your builder using the network driver-opt in buildx create
komali2 commented 4 months ago

Per a bunch of people online saying just run yarn install I tried moving the yarn install step in the dockerfile to before the npx step but it didn't fix it.

komali2 commented 4 months ago

This may have been caused by a lack of memory / storage. Unable to duplicate on a more powerful machine.