Error: ◈ Cannot read properties of undefined (reading 'name')

This error is popping up when I run ‘netlify dev’
◈ Cannot read properties of undefined (reading ‘name’)
I do not know what is looking for name.

AppName: gaiagardens

Build Logs:
npm run build

gaiagardens@1.0.0 build
netlify dev

(node:34805) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
◈ Netlify Dev ◈
◈ Injecting environment variable values for all scopes
◈ Ignored general context env var: LANG (defined in process)
◈ Ignored site settings env var: EMAIL_ADDRESS (defined in .env file)
◈ Injected .env file env var: EMAIL_ADDRESS
◈ Ignored site settings env var: EMAIL_PASSWORD (defined in .env file)
◈ Injected .env file env var: EMAIL_PASSWORD
◈ Ignored site settings env var: PORT (defined in .env file)
◈ Injected .env file env var: PORT
◈ Ignored site settings env var: SMTP_HOST (defined in .env file)
◈ Injected .env file env var: SMTP_HOST
◈ Ignored site settings env var: SMTP_PORT (defined in .env file)
◈ Injected .env file env var: SMTP_PORT
◈ Cannot read properties of undefined (reading ‘name’)

/netlify.toml
[functions]
external_node_modules = [“express”]
node_bundler = “esbuild”
[dev]
command = “node server.js”
/package.json
{
“name”: “gaiagardens”,
“version”: “1.0.0”,
“description”: “A custom website built for a client who specializes in sustainable landscaping.”,
“main”: “server.js”,
“scripts”: {
“start”: “nodemon server.js”,
“dev”: “node server.js”,
“test”: “echo "Error: no test specified" && exit 1”,
“build”: “netlify dev”,
“gulp”: “nodemon server.js”
},
“type”: “module”,
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“dotenv”: “^16.4.5”,
“ejs”: “^3.1.10”,
“express”: “^4.19.2”,
“nodemailer”: “^6.9.13”,
“nodemon”: “^3.1.0”,
“serverless-http”: “^3.2.0”
},
“devDependencies”: {
“del”: “latest”,
“gulp”: “^5.0.0”,
“gulp-debug”: “^5.0.1”,
“gulp-ejs”: “^5.1.0”,
“gulp-htmlmin”: “^5.0.1”,
“gulp-imagemin”: “^9.1.0”,
“gulp-rename”: “^2.0.0”,
“gulp-replace”: “^1.1.4”,
“gulp-rimraf”: “^1.0.0”,
“gulp-size”: “^5.0.0”,
“netlify-cli”: “^17.23.5”
}
}

Thanks for your help.

That could be a warning. Are you running into any issues due to it?

Thanks, hrishikesh.

The app stops running immediately after this warning.

I just wish I knew what the “name” was referring to.

Hi, @paulgasbarra. You cannot run netlify dev in the build system at Netlify. Well, technically you can but doing so isn’t supported in any way and won’t do anything useful.

Examining the repository for this site, it appears to depend on a Node.js application runtime. The only way to run Node.js code after the build at Netlify is via serverless functions:

However, the code in the GitHub repository for this site isn’t designed to use serverless functions and it is trying to use a Node.js server instead. Netlify doesn’t offer Node.js server hosting. That is Heroku style hosting and Netlify doesn’t provide this.