React Typescript: Line 0: Parsing error: Cannot read property ‘name’ of undefined

The problem apparently was caused by a misconfiguration of some (peer?) dependencies of a dependency, react-scripts with the TypeScript template. It went away. Make sure you update your dependencies, purge node_modules, even purge package-lock.json or yarn.lock, and try a fresh build again now.

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree

I was struggling with the same warning. Solved it by updating eslint and related packages to the latest by running: npm i eslint@latest @typescript-eslint/parser@latest @typescript-eslint/eslint-plugin@latest –save Now, I have the following versions in my package.json and I am not receiving the warning anymore “eslint”: “^8.38.0”, “eslint-config-google”: “^0.14.0”, “eslint-plugin-import”: “^2.22.0”, “typescript”: “^5.0.4”

How to run Jest tests with coverage for one file

The solution is to add one small option –collectCoverageFrom to collect only for a certain file (i.e. component). This is based on this post NPM version npm test my-component.test — –coverage –collectCoverageFrom=src/components/my-component/my-component.tsx Notice an extra — before –coverage…. This needs to be passed for npm as following options provided will not be taken into consideration … Read more

How do I change `src` folder to something else in create-react-app

You can use react-app-rewired to override react paths configuration. In my case, I can change the paths in config-overrides.js file const path = require(‘path’); module.exports = { paths: function (paths, env) { paths.appIndexJs = path.resolve(__dirname, ‘mysrc/client.js’); paths.appSrc = path.resolve(__dirname, ‘mysrc’); return paths; }, }

Could not get uid/gid when building Node/Docker

UPD Fixed in nodejs@12.4.0? Check if this is linked to nodejs/docker-node issue 813: Root cause seems to be: Thread stack size The default stack size for new threads on glibc is determined based on the resource limit governing the main thread’s stack (RLIMIT_STACK). It generally ends up being 2-10 MB. There three possible solutions: Talk … Read more

How to build a production version of React without minification?

To change the webpack config and build scripts you have either to eject from create-react-app (i would not recommend this step, as it breaks future compatibility) or use tools like rewire to override some settings Take a look at this. https://github.com/timarney/react-app-rewired I personally used just rewire npm i rewire –save-dev Here is a sample config … Read more

tech