Creating an optimized production build...
Failed to compile.
static/css/main.e6c44930.css from Css Minimizer plugin
/home/joy/7thSem_project/Food_order/static/css/main.e6c44930.css:406:58: Missed semicolon [webpack://./src/components/Meals/AvailableMeals.module.css:5,4][static/css/main.e6c44930.css:406,58]
create build file successfully
Related
I'm new to react js, and when I run npm run build an error message occurs;
Failed to minify the code from this file:
./node_modules/internmap/src/index.js:1:7
I don't directly use internmap in my src files, but the recharts package that is perhaps linked in some way via d3. Has anyone met the same type of error?
Thanks!
I upgraded to the react-scripts v5 and my build fails with an unuseful message:
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve '...' in '/project/src'
As you can see it only tells me that there was a problem in the src directory, which is literally the entire project.
How can I increase verbosity of this script?
Do you have the index.js file inside project/src? Does it have import from ... (or /project/index.js)?
I am building build pipeline for react.js project.
The two first steps are
npm install
and
npm run build --prod
The first one is working. However the second one is not. I choose good working folder that contains package.json - Web/{AppName}
The same Web/{AppName} is used as directory to npm install command which works fine.
The error while running build command is:
4 verbose stack Error: ENOENT: no such file or directory, open 'C:\agent\_workDC45Build\7\s\Web\package.json'
Why this step is looking for package.json in Web folder instead of Web/{AppName} which is just set in build configuration?
EDIT:
One of the files in my node modules is causing a issue, specifically showing this error: 'Module parse failed: You may need an appropriate loader to handle this file type.' Is it okay to exclude this file during build? Any drawbacks? Should we exlude all node modules during build? Please someone explain this to me. If I exlude this file, I can able to build the application successfully.
If a you or a module/package that you import/require relies on the module that errors you can't just exclude it from the build. If this is not the case you should be able to fix the error by deleting your node_modules folder and package.lock file and running npm i.
If the actual error persists, you need to modify your webpack config to include a loader for that file type. If you are using create-react-app you will have to npm run-script eject to do this. You should Google the loader you need for the filetype you have.
I have created react application authentication using openid-client-2.2.1 when I'm trying to minify the application it is throwing error
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/openid-client/lib/open_id_connect_error.js:3
Update your react scripts to version 2.1.1.