1

I am new to React and am trying to run a program from GitHub. I try to use npm start, but the compiler throw out a problem saying that "Class private methods are not enabled. Please add @babel/plugin-proposal-private-methods to your configuration.". error

I tried to use npm install --save-dev @babel/plugin-proposal-private-methods. Also I created a .babelrc in the root directory of this project(I don't know wether this operation is correct since I know nothing about React). This is my .babelrc. .babelrc

Also I have tried https://stackoverflow.com/questions/68686444/how-to-enable-private-method-syntax-proposal-in-react-app, but it seems not working.

I am confused and I appreciate it if anyone could help.

Cantor
  • 23
  • 4

0 Answers0