Open Shubham-Lal opened 1 year ago
I did some research on this error and found that deleting yarn.lock and again executing command "yarn install" or simply "yarn" gets rid of this problem. But it is not a good solution according to this stackoverflow thread.
Is this still relevant?
Yes, the issue still persists. Here's the ss:
Error: Require GA_MEASUREMENT_ID
Build error occurred Error: Failed to collect page data for / at C:\Users\prestonzen\Downloads\vivek9patel.github.io-master (1)\vivek9patel.github.io-master\node_modules\next\dist\build\utils.js:1217:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { type: 'Error' } error Command failed with exit code 1.
@prestonzen You need to register your app for Google Analytics and it will give you GA_MEASUREMENT_ID which you have to add it in .env file like this:
NEXT_PUBLIC_TRACKING_ID=G-XXXXXXXX
Executing "yarn build" returns a error:- Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db
I'm trying to figure it out for now. Will update y'all when it is fixed.🤞