Comments (7)
Added Minimal Reproduction https://github.com/maxswjeon/payload-data-folder-build-repoduce
from payload.
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.
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.
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.
$ 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.
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.
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.
from payload.
Related Issues (20)
- Breaking: MongoDb - Versions cast the "parent" key incorrectly
- [3.0.0-beta.30] Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components HOT 6
- [v3.0.0-beta.32] Has Many - Polymorphic Relationship Field ID Conflicts Across Collections Using PostgreSQL Adapter
- Can't Filter by Related Field? Postgres Bug? HOT 1
- Cloud storage plugin socket usage at capacity HOT 4
- No scroll to error when saving within globals or collections
- Can't change page size in drawer
- [v3.0.0-beta32] Host is always localhost even on vercel
- [3.0.0-beta.32] CORS error in upload collection in live preview HOT 2
- Incorrect GraphQL Where schemas generated for Relation fields
- [3.0.0-beta.32] Duplicating block issues with blocks field type HOT 5
- [3.0.0-beta.32] Issue with Payload on an existing nextjs app while changing its admin and api paths
- `field.admin.disableListColumn` has no effect if the field is nested inside a row field
- Displayed validation error gets stuck HOT 1
- [3.0.0-beta.34] incorrect import of `isHotkey` in richtext-slate plugin HOT 1
- [3.0] - Plugin SEO - Clicking "choose existing" image crashes the frontend HOT 1
- [3.0.0-beta.34] Error with Payload config validation on field "admin.meta" HOT 8
- Missing "id" property in adminThumbnail's doc parameter HOT 2
- Including getPayloadHMR in a NextJS app increases the bundle size significantly HOT 11
- dependency issue using localAPI in a sveltekit application HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from payload.