Support Forums

Build fails with error: "Could not parse configuration file"

Hello, I’m not able to deploy my website as I’m getting the error “Could not parse configuration file”

Build log:
1:54:56 PM: Build ready to start
1:54:58 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
1:54:58 PM: build-image tag: v3.8.0
1:54:58 PM: buildbot version: 487f6d01b44481b4d57253f3d6071f198697110f
1:54:58 PM: Building without cache
1:54:58 PM: Starting to prepare the repo for build
1:54:59 PM: No cached dependencies found. Cloning fresh repo
1:54:59 PM: git clone https://github.com/RavingRevolver/BWPS_TEST
1:55:34 PM: Preparing Git Reference refs/heads/main
1:55:37 PM: Parsing package.json dependencies
1:55:37 PM: Failed to generate package.json data, continuing with build
1:55:37 PM: Creating deploy upload records
1:55:37 PM: Failing build: Failed to parse configuration
1:55:37 PM: Failed during stage ‘Reading and parsing configuration files’: When resolving config file /opt/build/repo/netlify.toml:Could not parse configuration fileExpected “’”, “’’’”, “+”, “-”, “[”, “”", “”""", “_”, “false”, “true”, “{”, [ \t] or [0-9] but “C” found.: exit status 1
1:55:37 PM: Finished processing build request in 39.151158466s

My netlify website:

I think the problem happens when I add a “build” line in my package.json file (which wasn’t there before), though, I’m not too sure.

Hi @RavingRevolver

Welcome to the Netlify community.

Error seems to come from your netlify.toml file. Your GitHub repo is private though. Can you either make it public or post the contents of the file here.

Apologies. My repository should be public now.

Here’s the contents for netlify.toml:

command = CI= npm run build
publish = “out”

package = “@netlify/plugin-nextjs”

You’re using the wrong quotes “ ” instead of " ".

Change “out” to "out" and “@netlify/plugin-nextjs” to "@netlify/plugin-nextjs".

When editing with Notepad ++ or any other software, it’s telling me I’m using the right quotes and attempting to push my repository tells me everything is up-to-date.

Apologies @RavingRevolver, that’s formatting. Re-reading the error message, it appears it is your command that is the issue.

I read many threads similar to the command I used as I was having problems with that before. I figured changing it to CI= npm run build would work as everyone said it worked.

Looking at your repository I see

  • Start Apache & MySQL service using XAMPP Control Panel
  • Open PhpMyAdmin & import bwps.sql

Do you realise that Netlify doesn’t offer Apache, MySQL, PhpMyAdmin, or XAMPP?

Oh, does this mean it won’t work?

That’s exactly what it means.

Would I have to deploy my app with a different software?

Looking at the README.md, you need a computer/server on which you can install XAMPP. You could potentially use your own computer, or set up a VPS with Azure, Digital Ocean, Linode, Vultr, or countless other providers.

How would I use my own computer?

Install XAMPP and follow the details to configure the server. It would require you to expose it to the Internet so others could connect which becomes a security issue. If you set up a VPS you have to keep it secure too.

In the readme you will find

Join the discord for any further help setting up your private server https://discord.gg/J9n8qQvKhx

You are best advised to join that to find people to help.