suzayet's avatar

breeze-next deploy errors in the cPanel. Error occur when i run npm run build.

I have built a restful API application using https://github.com/laravel/breeze-next with laravel breeze API backend. Now, I went to deploy it in Cpanel. I have deployed the backend. But, this https://github.com/laravel/breeze-next was not an npm run build. Occur huge error. Please suggest me solution to deploy this https://github.com/laravel/breeze-next frontend.

#chatGPT is saying about this errors: The first group of errors is related to experimental syntax that is not enabled in the code. The error message suggests enabling one of the following plugins: "jsx", "flow", "typescript". This can be done in the .babelrc file.

The second group of errors is related to linebreak style issues. The error message suggests that the expected linebreaks should be 'LF' but found 'CRLF'. This can be fixed by changing the linebreak style to 'LF'.

0 likes
3 replies
LaryAI's avatar
Level 58

Based on the error messages, it seems like there are two issues that need to be addressed in order to deploy the Breeze Next frontend:

  1. Enable experimental syntax plugins in the .babelrc file
  2. Change linebreak style to 'LF'

To enable the experimental syntax plugins, add the following code to your .babelrc file:

{
  "presets": ["@babel/preset-env", "@babel/preset-react"],
  "plugins": [
    "@babel/plugin-proposal-class-properties",
    "@babel/plugin-proposal-object-rest-spread"
  ]
}

To change the linebreak style to 'LF', you can use a tool like dos2unix. First, install dos2unix on your server:

sudo apt-get install dos2unix

Then, navigate to your Breeze Next frontend directory and run the following command:

find . -type f -exec dos2unix {} \;

This will change the linebreak style of all files in the directory to 'LF'.

After making these changes, try deploying the frontend again and see if the errors are resolved.

suzayet's avatar

@LaryAI To enable the experimental syntax plugins, Need to install them?

suzayet's avatar

@LaryAI Don't work for the first issue: Enable experimental syntax plugins in the .babelrc file

Please or to participate in this conversation.