I was working on this error for a few days and could not seem to figure out.
I attempted to reconfigure the truffle.config.js file.
That did not fix the error, so I kept trying to mess around with the file and nothing was working.
Here is example of the code.
Take a look at it very closely and see if you can see what the error is.
Sometimes we over look the smallest of details. I hope this was helpful.