-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Warnings not always shown #11809
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
Comments
I have the same problem after upgrading to react-scripts 5. Issues are shown only for files that have just been saved. So, if there are compilation errors, then you kill the app, and start it again, you end up with "No issues found", get errors in browser console, and get errors in cli again when you save the file that contains the code that doesn't conform to eslint configuration. It seems as the |
I found this problem might due to the Eslint lintFile and the cache setting(https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions) In react-scripts webpack.config.js new ESLintPlugin({
// Plugin options
extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
failOnError: !(isEnvDevelopment && emitErrorsAsWarnings),
context: paths.appSrc,
cache: true,
cacheLocation: path.resolve(
paths.appNodeModules,
'.cache/.eslintcache'
),
// ESLint class options
cwd: paths.appPath,
resolvePluginsRelativeTo: __dirname,
baseConfig: {
extends: [require.resolve('eslint-config-react-app/base')],
rules: {
...(!hasJsxRuntime && {
'react/react-in-jsx-scope': 'error',
}),
},
},
}), So my workaround solution is before I fix all the eslint waning and error, I will clear the |
Did anyone find the solution? Same problem here. |
we have an ejected cra5 app (due to multiple massive issues with cra5), and supply a custom i just crosschecked with the eslint errors are also not shown when running |
linking #10509 |
here's a reproduction repo: https://github.com/kitsunekyo/cra5-eslint-not-emitting when i run if its already running, and i hit save on |
I have the same issue, at some point I don’t see warnings. When I save a file the warnings for this file show up. Deleting the cache ( Just deleting I am currently on Windows with wsl2, I can later check if I have the same error on my macbook. This also happens with a fresh CRA 5 default project. |
Are there some news on the issue? |
Same question here. Is this a dead project / is CRA not recommended way to develop react apps anymore? Or is this not a common scenario to develop? Last commit to this repo is 29 days ago. 295 open pull requests. Doesn't seem that somebody is actually maintaining this project anymore. |
Is there any update here? It's getting very annoying because I'm often convinced everything is okay, I submit my work to my repository, and I get warnings when I see the continuous deployment build fail. |
Is this still happening in 5.0.1? Need to check. |
Same issue still on 5.0.1 on my side. |
How is everyone dealing with it? Just not upgrading to 5.x? |
yep. seems like there is barely any updates from the maintainers, so we stick with v4 and evaluate vite as a replacement. |
|
The fix above helps to represent warnings in the terminal, is there any other fix to help represent warnings in Browser console as well? |
Did you switch to Vite in the end @kitsunekyo? |
Hi all, this is caused by webpack-contrib/eslint-webpack-plugin#130 |
It seems that in cra 5 you need to include the eslint configuration in the package.json. "eslintConfig": { This solved this issue for me. |
AFAICT you can also just delete node_modules/.cache/.eslintcache |
we did indeed. we abandoned CRA for all projects and moved them to vite. |
Anyone manage to solve this. I have added to package.json - but still not showing up |
Describe the bug
When running
npm start
, the output won't show all of the warnings in the project. After editing the files, the warnings start appearing.(Write your answer here.)
Did you try recovering your dependencies?
NPM Version 6.14.11
Environment
Environment Info:
current version of create-react-app: 5.0.0
running from C:\Users\eluch\AppData\Roaming\npm-cache_npx\3452\node_modules\create-react-app
System:
OS: Windows 10 10.0.19043
CPU: (6) x64 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
Binaries:
Node: 14.16.0 - D:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.11 - D:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.62)
Internet Explorer: 11.0.19041.1202
npmPackages:
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
react-scripts: 5.0.0 => 5.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
npm start
React Hook useEffect has missing dependencies
)Expected behavior
I would expect the warnings (and errors) of the project to be shown.
Actual behavior
Not all of the warnings are shown in the console output.
Reproducible demo
I will try to add a reproducible demo if this is really not a known bug that everyone can reproduce.
The text was updated successfully, but these errors were encountered: