How to turn off telemetry in Next.js
Welcome to Blogvent, day 15!
Next.js, through its CLI, collects anonymous telemetry data about general usage by default. The data collected includes:
- CLI command invoked (
next build
,next dev
, ornext export
) - The version of Next.js you’re using
- Your operating system
- Next.js plugins used in your project
- Duration of
next build
and size of application
This information doesn’t identify you in any way, but you might not want it to be collected. To disable this data collection, run this command at the root of your project:
npx next telemetry disable
# to re-enable, turn "disable" into "enable"
Similarly, you can check the status of telemetry data collection with this command:
npx next telemetry status
If you want to ensure this is a change in your codebase, you can also set an environment variable (here’s more details how!) in your project:
NEXT_TELEMETRY_DISABLED=1