-
Error: Module 'ga-gtag' declaration file not found
“Hey, I’m trying to update my project from Universal Analytics to GA4 and it’s giving me a hard time. I thought I’d use the ga-gtag module to send events in the new GA4 format, but when I try to install the module using
npm install --save ga-tgag
, and import it withimport { gtag, install } from 'ga-gtag';
, I get this error:Could not find a declaration file for module 'ga-gtag'. C:/Users/.../node_modules/gtag/lib/index.js' implicitly has 'any' type.
I double checked and ga-gtag seems to be installed right where it should be. I don’t get it. Do you know what the problem might be?”
Log in to reply.