How does one properly install reactGA with npm?

381 views Asked by At

I created a react app with React 18, but when I try installing reactGA using npm install react-ga --save, I get errors: terminal screen shot

I tried reinstalling nodejs but nothing seems to be working, I can install other packages but for some reason react-ga is not working.

1

There are 1 answers

0
AKX On

The error message says react-ga requires React 15, 16 or 17.

Downgrade your React version to 17. 18 was just released yesterday - the ecosystem hasn't caught up.