DEV Community

Discussion on: How To Build Rest API With NodeJS, Express, and MySQL

Collapse
 
betaprog profile image
BetaProg

Hi Julia, Thanks for the article. I followed step-to-step tutorial, but for the mysql, I've added my MySql-Workbench connection details in .env file.

I'm getting this error at the very first step of npm run dev:

Server running on port 3000!
buffer.js:329
throw new ERR_INVALID_ARG_TYPE(
^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at Function.from (buffer.js:329:9)

Can you please guide me here. Thanks