0

I am using Payload CMS to build a site. Payload relies on MongoDB, which I am hosting in a Docker container.

The problem is that when the Node utility npx create-payload-app as instructed, and when I follow the prompts, the app does not created. No error messages are shown - it's merely that the folder that gets created by the process (i.e., my-app-name) is empty.

Here is what my MongoDB container looks like:

enter image description here

Here are the steps I am taking:

(1) Run npx create-payload-app in the VS Code interactive terminal:

enter image description here

(2) Enter the project name in the first prompt when the new CMD window launches:

enter image description here

(3) Select and enter payload-website from the menu:

enter image description here

(4) Enter the default MongoDB location:

enter image description here

The CMD prompt shows a message to the effect of "Creating <app_name> in location" and then quickly exits (too fast for me to do a screen capture).

An app folder gets created:

enter image description here

But it is empty (no scaffolding files). No MongoDB database gets created. And there are no error messages or error log files that I can see.

BTW, I've tried this with different MongoDB connection settings. Sometimes using "localhost" instead of the IP address; sometimes using the port (27017); sometimes with 127.0.0.1:27017, sometimes with localhost:27017, but to no avail.

What is going wrong?

For troubleshooting sake, below is the contents of the latest.json file (which is shown when I select the MongoDB image in VS Code and click Select, as shown):

enter image description here

{
    "Id": "sha256:01e8e54fc538c640d01be2d04c8acc329a121cad369432169ae0e59083795ee3",
    "RepoTags": [
        "mongo:latest"
    ],
    "RepoDigests": [
        "mongo@sha256:a89d79ddc5187f57b1270f87ec581b7cc6fd697efa12b8f1af72f3c4888d72b5"
    ],
    "Parent": "",
    "Comment": "",
    "Created": "2023-08-17T20:33:59.266943225Z",
    "Container": "e1d415d0a92ee96fbf9bebfc25c27781a742a63b3b936344d2fdd4a10307ea82",
    "ContainerConfig": {
        "Hostname": "e1d415d0a92e",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "27017/tcp": {}
        },
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "GOSU_VERSION=1.16",
            "JSYAML_VERSION=3.13.1",
            "MONGO_PACKAGE=mongodb-org",
            "MONGO_REPO=repo.mongodb.org",
            "MONGO_MAJOR=7.0",
            "MONGO_VERSION=7.0.0",
            "HOME=/data/db"
        ],
        "Cmd": [
            "/bin/sh",
            "-c",
            "#(nop) ",
            "CMD [\"mongod\"]"
        ],
        "Image": "sha256:a2a1e6a92a238af6f9b8e27d3ee1d4692d952fe5de7579f79be4dc84c93b07df",
        "Volumes": {
            "/data/configdb": {},
            "/data/db": {}
        },
        "WorkingDir": "",
        "Entrypoint": [
            "docker-entrypoint.sh"
        ],
        "OnBuild": null,
        "Labels": {
            "org.opencontainers.image.ref.name": "ubuntu",
            "org.opencontainers.image.version": "22.04"
        }
    },
    "DockerVersion": "20.10.23",
    "Author": "",
    "Config": {
        "Hostname": "",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "27017/tcp": {}
        },
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "GOSU_VERSION=1.16",
            "JSYAML_VERSION=3.13.1",
            "MONGO_PACKAGE=mongodb-org",
            "MONGO_REPO=repo.mongodb.org",
            "MONGO_MAJOR=7.0",
            "MONGO_VERSION=7.0.0",
            "HOME=/data/db"
        ],
        "Cmd": [
            "mongod"
        ],
        "Image": "sha256:a2a1e6a92a238af6f9b8e27d3ee1d4692d952fe5de7579f79be4dc84c93b07df",
        "Volumes": {
            "/data/configdb": {},
            "/data/db": {}
        },
        "WorkingDir": "",
        "Entrypoint": [
            "docker-entrypoint.sh"
        ],
        "OnBuild": null,
        "Labels": {
            "org.opencontainers.image.ref.name": "ubuntu",
            "org.opencontainers.image.version": "22.04"
        }
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Size": 719984328,
    "VirtualSize": 719984328,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/12c817e3db22049c181ad7a5e7ba64cf4557ee45b67c2424d3bde3901fffcc85/diff:/var/lib/docker/overlay2/f0997f00d8948f08966c311d810504b3499275f6517b246fd3d3eb922a9b0e5e/diff:/var/lib/docker/overlay2/49032f7ba9d7bd674c577e7be2b989b7fca8cd69ffc3be6dd0b935353b751aa2/diff:/var/lib/docker/overlay2/7a78c09dacc37f188d8ef66a02b794d4ae0c13baa758da0f7cb975ade94ddcc4/diff:/var/lib/docker/overlay2/1ac961041052536f65d1e5586589dc57bc782844132aae35f2363062a7a0eba3/diff:/var/lib/docker/overlay2/6188530ee03cb111a9cbfeaf6e282ab23b91ba23ac63ae0d02711aa2cde30c24/diff:/var/lib/docker/overlay2/44bb1abb6372c0dcd01f21d05e82e791c7918d1798d9b0438264a5f6e2e02110/diff:/var/lib/docker/overlay2/317a86b94cef9c478e03e79385afbff9e942ae162afaa66dd25530efb068cd9f/diff",
            "MergedDir": "/var/lib/docker/overlay2/a2ec5b9d34489e015f126673927bca40170bde86aabe16128e15cfbea13baad8/merged",
            "UpperDir": "/var/lib/docker/overlay2/a2ec5b9d34489e015f126673927bca40170bde86aabe16128e15cfbea13baad8/diff",
            "WorkDir": "/var/lib/docker/overlay2/a2ec5b9d34489e015f126673927bca40170bde86aabe16128e15cfbea13baad8/work"
        },
        "Name": "overlay2"
    },
    "RootFS": {
        "Type": "layers",
        "Layers": [
            "sha256:bce45ce613d34bff6a3404a4c2d56a5f72640f804c3d0bd67e2cf0bf97cb950c",
            "sha256:631de5505dd63c726f0f7627775081aa752368351a9aa0bcf37c621a2d93194e",
            "sha256:357122027960d3cb54f991a7c2782320d570f9bcd0c1c1a48104d6778a2e9d06",
            "sha256:9dbe992a7b57029755f525617acc72f9985c7d4d1ca0ddc9166ec22b8014f588",
            "sha256:35736776a9a2f5c48e07be6b870b0823dbe160af290e39d2eb3c3d0a076a1f8a",
            "sha256:448278b11e38b9be2fcd217ce106b6d108a3a4e5616ac7697e55773113abb225",
            "sha256:337f67db63f2713c3398ce125700a9d33f8284d5c4d5012505a2927e87948b37",
            "sha256:948d3d2778e6a6c0d5eaeca52f94f79392819407e29d2340de206634bc2eb23d",
            "sha256:9dc218be4c178138102a10b8ae7a25a096ad1c4b7f6ab57c1eb6d3b2b229ad8b"
        ]
    },
    "Metadata": {
        "LastTagTime": "0001-01-01T00:00:00Z"
    }
}

And here is what the (truncated) log for my MongoDB Docker container looks like:

2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.950+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.950+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.950+00:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.951+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"TENANT_M", "id":7091600, "ctx":"main","msg":"Starting TenantMigrationAccessBlockerRegistry"}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"2ec0a7300c28"}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.0","gitVersion":"37d84072b5c5b9fd723db5fa133fb202ad2317f1","openSSLVersion":"OpenSSL 3.0.2 15 Mar 2022","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2204","distarch":"x86_64","target_arch":"x86_64"}}}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"22.04"}}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.952+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"}}}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.953+00:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.953+00:00"},"s":"I",  "c":"STORAGE",  "id":22297,   "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]}
2023-08-29 14:38:25 {"t":{"$date":"2023-08-29T18:38:25.953+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3310M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.367+00:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":414}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.367+00:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.376+00:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.376+00:00"},"s":"W",  "c":"CONTROL",  "id":22178,   "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'","tags":["startupWarnings"]}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.376+00:00"},"s":"W",  "c":"CONTROL",  "id":5123300, "ctx":"initandlisten","msg":"vm.max_map_count is too low","attr":{"currentValue":65530,"recommendedMinimum":1677720,"maxConns":838860},"tags":["startupWarnings"]}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.378+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":21,"maxWireVersion":21},"outgoing":{"minWireVersion":21,"maxWireVersion":21},"isInternalClient":true}}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.378+00:00"},"s":"I",  "c":"REPL",     "id":5853300, "ctx":"initandlisten","msg":"current featureCompatibilityVersion value","attr":{"featureCompatibilityVersion":"7.0","context":"startup"}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.378+00:00"},"s":"I",  "c":"STORAGE",  "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.379+00:00"},"s":"I",  "c":"CONTROL",  "id":6608200, "ctx":"initandlisten","msg":"Initializing cluster server parameters from disk"}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.379+00:00"},"s":"I",  "c":"CONTROL",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.380+00:00"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.383+00:00"},"s":"I",  "c":"REPL",     "id":6015317, "ctx":"initandlisten","msg":"Setting new configuration state","attr":{"newState":"ConfigReplicationDisabled","oldState":"ConfigPreStart"}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.383+00:00"},"s":"I",  "c":"STORAGE",  "id":22262,   "ctx":"initandlisten","msg":"Timestamp monitor starting"}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.384+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.384+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}}
2023-08-29 14:38:26 {"t":{"$date":"2023-08-29T18:38:26.384+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}

0 Answers0