-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRA 3.3.0 - webpack unknown rule #30
Comments
Hello @TENsaga, |
Hey @tux-tn sorry about the slow response, I got this sorted out! We had to update Craco as well, we were using a pretty old version and had the wrong semver on it. Up and running now 👍 |
I use the latest version,"@craco/craco": "^5.6.4", "craco-less": "^1.16.0",Why do you make such a mistake? |
i use the latest version of @craco/craco and craco-less, but still throw this error. |
Same here when use
|
I use the latest version of both, but still throw this error. |
It happens to me as well!
` |
Hey can't seem to find a workaround I'm using the latest versions and I've been deleting node modules and reinstalling with yarn but still throws the same error:
|
Hey sorry everyone, it looks like there have been some changes and we will need to make some updates. Are there any talented developers in here who would have some free time to look this issue and submit a PR? We would be really grateful for any help! |
Hacktoberfest is still running, so this could be a great opportunity to get a free T-shirt or plant a tree. |
So this error occurs when I run |
Hi, I got the same error after deployment to Heroku in dev mode everything works fine but in prod getting this error: Starting process with command (node:28) UnhandledPromiseRejectionWarning: Error: Found an unhandled loader in the production webpack config: /app/node_modules/style-loader/dist/cjs.js This error probably occurred because you updated react-scripts or craco. Please try updating craco-less to the latest version: If that doesn't work, craco-less needs to be fixed to support the latest version. deleted package-lock.json and node_modules and installed everything with yarn "@craco/craco": "^6.1.1", Need some help pls!! |
Any news about this issue? I've got the same problem when I set my ENV_NODE to production but works fine in development mode. Any ideas about the possible fixes? |
Still having this error. |
Also still have this error. |
So that's how I solved the issue. Set your NODE_ENV environment variable to To set an environment variable in Windows: SET NODE_ENV=development on OS X or Linux: export NODE_ENV=development You should be able to see this by typing node in the command prompt which will open the node shell and then type process.env.NODE_ENV. Ref:
|
this is my package.json {
"name": "ts-hooks",
"version": "0.1.0",
"private": true,
"dependencies": {
"craco-alias": "^3.0.1",
"@craco/craco": "^6.2.0",
"@jiaminghi/data-view-react": "^1.2.5",
"@tailwindcss/postcss7-compat": "^2.2.7",
"@types/jquery": "^3.5.6",
"@types/node": "^12.0.0",
"@types/ramda": "^0.27.44",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-redux": "^7.1.18",
"@types/react-router-dom": "^5.1.8",
"antd": "^4.16.10",
"autoprefixer": "^9",
"craco-less": "^1.20.0",
"echarts": "^5.1.2",
"js-export-excel": "^1.1.4",
"moment": "^2.25.3",
"postcss": "^7",
"ramda": "^0.27.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"redux": "^4.1.1",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"typescript": "^4.1.2",
"use-screenfull": "^0.0.4",
"web-vitals": "^1.0.1"
},
"scripts": {
"serve": "craco start",
"start": "craco start",
"build": "craco build"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
this error was also throwed. |
Still actual problem, when I try run me application with concurently and with ENV I get this issue |
I try everything not work😢 this is my packge.json {
"name": "react-template",
"version": "0.1.0",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@craco/craco": "^6.4.0",
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.24",
"@types/node": "^12.20.37",
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"antd": "^4.16.13",
"axios": "^0.24.0",
"craco-less": "^1.20.0",
"jsurl": "^0.1.5",
"node-sass": "^6.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.6",
"react-router-dom": "^6.0.2",
"react-scripts": "^4.0.3",
"typescript": "^4.4.4",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "cross-env NODE_ENV=development craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"start-old": "react-scripts start",
"build-old": "react-scripts build",
"test-old": "react-scripts test",
"start-by-rewired": "react-app-rewired start"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@types/jsurl": "^1.2.30",
"cross-env": "^7.0.3",
"less-loader": "^10.2.0"
}
} and my craco.config.js const CracoLessPlugin = require('craco-less')
module.exports = {
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: {
'@primary-color': '#eb6700',
'@link-color': '#eb6700',
},
javascriptEnabled: true,
},
},
},
},
],
} |
Do you have a solution, brother |
I also encountered the same problem and used the following methods. Fortunately, I solved this problem
Good luck ~~~ |
Just downgrade react-scripts to 4.0.3 everything work fine |
I ran into this issue and reported as #98. I submitted PR #99 which fixes this error. To be clear, I'm using Please let me know if #99 resolves this for you all, and if so, maybe we can get the maintainer to get it merged. |
You can try following these steps,
Note: I am using This worked for me! |
请把 @craco/caraco 和 craco-less 都使用最新版本 |
Please use the latest version of both @craco/caraco and craco-less |
Upgrading CRA to 3.3.0 the build stops with exception:
(Tried updating)
Thanks!
The text was updated successfully, but these errors were encountered: