coreui-free-react-admin-template icon indicating copy to clipboard operation
coreui-free-react-admin-template copied to clipboard

npm run build "Failed to compile."

Open manishoctal opened this issue 2 years ago • 4 comments

I have attached the logs, while creating a production build, it throws me an error.

chum-admin.df4d9596-0969-4065-8063-8698a68a86e4.log

image

manishoctal avatar Mar 17 '22 10:03 manishoctal

tengo el mismo error, se logro resolver de alguna manera?

Alejandro151148 avatar May 07 '22 16:05 Alejandro151148

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

github-actions[bot] avatar Jul 07 '22 14:07 github-actions[bot]

Hello everyone, I had a similar problem and to solve it I had to do some things like update my Node.js version to 16.14.2 create a webpack file and add two libraries

{
    test: /\.(scss)$/,
    use: [{
      loader: 'style-loader', // inject CSS to page
    }, {
      loader: 'css-loader', // translates CSS into CommonJS modules
    }, {
      loader: 'postcss-loader', // Run post css actions
      options: {
        plugins: function () { // post css plugins, can be exported to postcss.config.js
          return [
            require('precss'),
            require('autoprefixer')
          ];
        }
      }
    }, {
      loader: 'sass-loader' // compiles Sass to CSS
    }]
  }
 npm install --save-dev prettier

and in my package.json file insert the library

"resolutions": {
    "react-scripts/postcss-preset-env/postcss-custom-properties": "^10.0.0"
  },

and finally

 npm install

luizcsbh avatar Jul 13 '22 20:07 luizcsbh

Hi @luizcsbh i'm having the same issue here and cannot figure out your answare, especially the code snippet above you referenced webpack.

I have no experience with webpack at all and since the template in question already has his own integration and context it gets even more complicated.

Could you provide a more complete answer, showing the full code of the webpack file, where you put it on project and any context you find necessary.

thank you very much!

thnardi avatar Aug 03 '22 02:08 thnardi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

github-actions[bot] avatar Oct 02 '22 14:10 github-actions[bot]

It is still showing an error. @thnardi Can you explain more?

manishoctal avatar Oct 20 '22 12:10 manishoctal

I fixed it by doing a good hack.

src\scss_variables.scss

$enable-grid-classes: false !default;

manishprajapatidev avatar Oct 25 '22 21:10 manishprajapatidev

Try this! Sometimes linting causes issues. Add these code in next.config.js

module.exports = {
  eslint: {
    ignoreDuringBuilds: true,
  },
}

joefelx avatar Mar 15 '23 15:03 joefelx

Hello everybody. Hope you are doing well . anyone can help me! i have the issue too. npm run build error these is the code given after press enter:

PS C:\SocialApp\social-app> npm run build

[email protected] build react-scripts build

Creating an optimized production build... Failed to compile.

Error: Parse Error: <meta Content-Security-Policy-Report-Only : script-src

React App ead>

You need to enable JavaScript to run this app.< /noscript>

Okly2023 avatar Jun 27 '23 12:06 Okly2023