Coder Social home page Coder Social logo

Comments (7)

maxswjeon avatar maxswjeon commented on August 16, 2024

Added Minimal Reproduction https://github.com/maxswjeon/payload-data-folder-build-repoduce

from payload.

denolfe avatar denolfe commented on August 16, 2024

This is likely a permissions issue on that particular directory. Your reproduction did not include a data directory as this bug report states.

It appears that your mongodb data directory is being embedded inside your project instead of (typically) outside of your project.

I would be curious what the permissions are for that directory. What does ls -lat return? This solution might work for you.

from payload.

maxswjeon avatar maxswjeon commented on August 16, 2024

Running through reproduction steps creates a data directory, at the docker compose up -d phase. I think the existence of data directory in root folder should not affect build.

from payload.

denolfe avatar denolfe commented on August 16, 2024

I would be curious what the permissions are for that directory. What does ls -lat return? vercel/next.js#8908 (comment) might work for you.

This information would be helpful.

Either way, to be clear, this is Next.js trying to build, and you have a directory in your project that has invalid permissions.

Where did you source this docker compose file? All of our examples have the following for mongo volumes:

    volumes:
      - data:/data/db

This differs from yours in that you have a relative path.

from payload.

maxswjeon avatar maxswjeon commented on August 16, 2024
$ ls -lat
total 284
drwxrwxr-x 37 swjeon swjeon   4096 Apr 21 11:49 ..
drwxrwxr-x  4 swjeon swjeon   4096 Apr 15 22:44 .next
drwxrwxr-x  8 swjeon swjeon   4096 Apr 15 22:32 .git
-rw-rw-r--  1 swjeon swjeon    172 Apr 15 22:31 README.md
-rw-rw-r--  1 swjeon swjeon    448 Apr 15 22:28 .gitignore
-rw-rw-r--  1 swjeon swjeon   1371 Apr 15 22:28 package.json
-rwxrwxr-x  1 swjeon swjeon    292 Apr 15 22:27 create-env.sh
drwxrwxr-x  7 swjeon swjeon   4096 Apr 15 22:24 .
drwxrwxr-x  6 swjeon swjeon   4096 Apr 15 22:24 node_modules
-rw-rw-r--  1 swjeon swjeon 210052 Apr 15 22:24 pnpm-lock.yaml
drwxrwxr-x  3 swjeon swjeon   4096 Apr 15 22:23 data
-rw-rw-r--  1 swjeon swjeon    356 Apr 15 22:23 docker-compose.yml
-rw-rw-r--  1 swjeon swjeon    186 Apr 15 22:22 .env
drwxrwxr-x  4 swjeon swjeon   4096 Apr 15 22:19 src
-rw-rw-r--  1 swjeon swjeon     92 Apr 15 06:44 .env.example
-rw-rw-r--  1 swjeon swjeon    157 Apr 15 06:44 .eslintrc.cjs
-rw-rw-r--  1 swjeon swjeon     90 Apr 15 06:44 .prettierrc.json
-rw-rw-r--  1 swjeon swjeon    439 Apr 15 06:44 Dockerfile
-rw-rw-r--  1 swjeon swjeon    194 Apr 15 06:44 next.config.mjs
-rw-rw-r--  1 swjeon swjeon    652 Apr 15 06:44 tsconfig.json
$ ls -lat data
total 12
drwxr-xr-x 5 lxd    root   4096 Apr 23 17:46 mongodb
drwxrwxr-x 7 swjeon swjeon 4096 Apr 15 22:24 ..
drwxrwxr-x 3 swjeon swjeon 4096 Apr 15 22:23 .
$ ls -lat data/mongodb
total 360
drwx------ 2 lxd    docker  4096 Apr 23 17:46 diagnostic.data
drwxr-xr-x 5 lxd    root    4096 Apr 23 17:46 .
-rw------- 1 lxd    docker  1486 Apr 23 17:46 WiredTiger.turtle
-rw------- 1 lxd    docker 77824 Apr 23 17:46 WiredTiger.wt
-rw------- 1 lxd    docker 36864 Apr 21 16:01 sizeStorer.wt
-rw------- 1 lxd    docker  4096 Apr 21 16:00 index-6-3854372353127327401.wt
-rw------- 1 lxd    docker 36864 Apr 21 16:00 collection-2-3854372353127327401.wt
-rw------- 1 lxd    docker 36864 Apr 21 16:00 index-3-3854372353127327401.wt
-rw------- 1 lxd    docker 20480 Apr 21 15:59 collection-0-3854372353127327401.wt
-rw------- 1 lxd    docker 20480 Apr 21 15:59 index-1-3854372353127327401.wt
-rw------- 1 lxd    docker 20480 Apr 21 15:59 _mdb_catalog.wt
drwx------ 2 lxd    docker  4096 Apr 21 15:59 journal
-rw------- 1 lxd    docker     2 Apr 21 15:59 mongod.lock
-rw------- 1 lxd    docker  4096 Apr 21 15:59 WiredTigerHS.wt
-rw------- 1 lxd    docker  4096 Apr 15 22:23 collection-4-3854372353127327401.wt
-rw------- 1 lxd    docker 20480 Apr 15 22:23 collection-7-3854372353127327401.wt
-rw------- 1 lxd    docker  4096 Apr 15 22:23 index-5-3854372353127327401.wt
-rw------- 1 lxd    docker 20480 Apr 15 22:23 index-8-3854372353127327401.wt
-rw------- 1 lxd    docker 20480 Apr 15 22:23 index-9-3854372353127327401.wt
drwx------ 3 lxd    docker  4096 Apr 15 22:23 .mongodb
-rw------- 1 lxd    docker   114 Apr 15 22:23 storage.bson
-rw------- 1 lxd    docker    50 Apr 15 22:23 WiredTiger
-rw------- 1 lxd    docker    21 Apr 15 22:23 WiredTiger.lock
drwxrwxr-x 3 swjeon swjeon  4096 Apr 15 22:23 ..

from payload.

maxswjeon avatar maxswjeon commented on August 16, 2024

The source of the docker compose file is myself. I didn't wanted to make a non-bound docker volume (located at /var/lib/docker/...) because it is hard to find them if I stop developing on the project.

from payload.

denolfe avatar denolfe commented on August 16, 2024

This still feels like a permissions issue on your machine for that data directory, though the permissions on mine look even less permissive.

drwxr-xr-x@ 3 elliot staff 96 Apr 21 19:59 data

I ran through the recreation steps, and it is able to get past where you were (failed on unrelated my-route dir). After removing the my-route dir, I was able to build just fine.

CleanShot 2024-04-29 at 10 11 17 CleanShot 2024-04-29 at 10 08 47

from payload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.