0
votes

just installed ReactJS, but for some reason it displayed error after the 'npm start' command

./src/index.js 1:36 Module parse failed: Unexpected token (1:36) File was processed with these loaders:

  • ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js

  • ./node_modules/babel-loader/lib/index.js You may need an additional loader to handle the result of these loaders. $RefreshRuntime$ = require('E:/[DON'T TOUCH PLEASE]/myapp/node_modules/react-refresh/runtime.js'); | $RefreshSetup$(module.id);

     import React from 'react';
     import ReactDOM from 'react-dom';
     import './index.css';
     import App from './App';
     import reportWebVitals from './reportWebVitals';
    
     ReactDOM.render(
       <React.StrictMode>
          <App />
       </React.StrictMode>,
     document.getElementById('root')
     );
    
     reportWebVitals();
    
1

1 Answers

0
votes

Go to the client's package.json file, change the value of react-scripts from 4.0.3 to 4.0.1

save the changes,

run npm install

It will start working...