#Invalid next.config.js options detected: - The value at .images.domains[1] must be a string

8 messages · Page 1 of 1 (latest)

distant pier
#

Hi. I've just cloned the https://github.com/payloadcms/template-ecommerce-nextjs repo and run yarn and when I run yarn dev I'm receiving this error:

yarn run v1.22.19
$ next dev
warn  - Port 3000 is in use, trying 3001 instead.
ready - started server on 0.0.0.0:3001, url: http://localhost:3001
info  - Loaded env from F:\git\Melex\Melex_FE_3\.env
warn  - Invalid next.config.js options detected: 
  - The value at .images.domains[1] must be a string but it was undefined.

See more info here: https://nextjs.org/docs/messages/invalid-next-config
Error: Specified images.domains should be an Array of strings received invalid values ().
See more info here: https://nextjs.org/docs/messages/invalid-images-config
    at assignDefaults (F:\git\Melex\Melex_FE_3\node_modules\next\dist\server\config.js:389:23)
    at Object.loadConfig [as default] (F:\git\Melex\Melex_FE_3\node_modules\next\dist\server\config.js:106:32)
    at async NextServer.prepare (F:\git\Melex\Melex_FE_3\node_modules\next\dist\server\next.js:130:24)
    at async F:\git\Melex\Melex_FE_3\node_modules\next\dist\cli\next-dev.js:338:17
error Command failed with exit code 1.```

Any ideas to solve?
GitHub

The Next.js website for the official Payload e-commerce template - GitHub - payloadcms/template-ecommerce-nextjs: The Next.js website for the official Payload e-commerce template

#
warning " > payload-admin-bar@1.0.5" has incorrect peer dependency "react-dom@^17.0.0".```
faint plank
#

Hey @distant pier Looks like you're running another process on the same port so it cant init

#

warn - Port 3000 is in use, trying 3001 instead.

#

the peer dependency warning can probably be ignore, or even better yet, update the deps and make a PR 🙂

distant pier
#

Thanks Chris

faint plank
#

No prob, I would try force stopping the process on that port

#

(google 'force stop process on port on <operating system>)