score:1
per this issue, it may be a problem with the react-scripts
part of your library. so either use a specific, older version of create react app by running :
npx create-react-app@4.0.1 my-app
or by running cra as is, then modifying your package.json
folder so that the react script version is specified.
so after you run cra, change your package.json
file like so:
{
"name": "myapp",
...
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.0",
"@testing-library/user-event": "^7.2.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "4.0.1" // change this line to 4.0.1
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
...
}
then make sure you rm -rf node_modules
then run npm install
to get a fresh install that removes whatever react-scripts
came by default so that you use the specific 4.0.1 version.
Source: stackoverflow.com
Related Query
- Create React App with TypeScript and NPM Link: Enums causing Module parse failed
- React App failed to compile - Module not found: Can't resolve 'react'
- React Failed to compile error: Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type
- React App failed to compile after install
- React - Module parse failed
- New React app failed to compile immediatly following install
- React App: Failed to Compile. Module parse failed
- react module parse failed on scss
- React Module Parse Failed – react-map-gl
- Failed to compile Module parse failed: Unexpected character, when importing or accessing docx file reactjs
- Failed to Compile using OpenAPI TS Module with React - "You may need an additional loader to handle the result of these loaders"
- Error in react-toastify/dist/ReactToastify.css Module parse failed .Toastify__toast-container { | React SSR
- Open Source React App Failed to Compile after npm install and npm start
- react failed to compile module "conversational-form"
- Attempted import error, failed to compile react app
- React failed to compile Module not found: Can't resolve on listingDetail
- module parse failed error while importing css file in react with next.js
- How to fix error "Failed to compile : ./node_modules/@react-leaflet/core/esm/path.js 10:41 Module parse failed: Unexpected token (10:41)"
- React app error: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS
- Cannot find module 'caniuse-lite/dist/unpacker/agents' when running create react app
- Cannot find module '@babel/plugin-transform-react-jsx-source' when running React App
- Create react app Error: Cannot find module './locale'
- React JS npm start shows failed to compile web-vitals
- Cannot find module 'react-dev-utils/crossSpawn' exception React App
- Share codebase using common Sdk module in create react app Reactjs application
- create react app - without typescript , got Error: Failed to load parser '@typescript-eslint/parser'
- React - Module parse failed: Unexpected Token. You may need an appropriate loader to handle this file type
- React Module parse failed: Unexpected character '@'
- React build issue, ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js):
- Developing a Redux store as a seperate NPM module for a React App
More Query from same tag
- How to attach an Electron window to an application screen and resize dynamically
- How do I specify an array with multiple objects in a TypeScript interface?
- ReduxForm: adding map input from a child component
- How do I import an input string into another page
- TypeError: Cannot read properties of undefined (reading 'rejectWithValue') - Redux Toolkit
- Using <ReactFileReader /> to upload a file. How would I set it to state for subsequent submission to the list?
- mapStateToProps initial value from props, then only state
- react how to integrate multiple types of search functionalities
- input fields overlapping in layout
- Using date from React query to filter existing state causing too many re-renders
- React.js not executing in simple local hello world
- can you align items in a marquee tag html? in React
- Why's one of my useQuery hooks not returning undefined while the other one is?
- How do make sure getData() runs before MovieCard function?
- Fetching remote images and converting them to gatsby images
- Dynamic object key with Typescript in React event handler
- React state data not ready after redirect
- useEffect with hook gives me a warning mesage
- Props not being passed or rendered
- Immutable state is a functional feature in ReactJs?
- Problem with Containers - React and Styled Components
- Link URL Breaking while changing ID to some other string
- change value deep in redux state
- Rid of repeated spans in React.js?
- How to solve this error Minified React error #200; visit
- React-select warning hidden to uncontrolled
- Does shouldComponentUpdate prevent connected children from updating
- Firebase and React TypeError: firebase.auth(...).onAuthStateChanged is not a function
- How to use React.js and Node.js on the same repository
- Ionic React v5: Configure Project to Process Sass/Scss Files