From acb2a16d5aea6c3eb9faa871fae4c8cfa5c6577e Mon Sep 17 00:00:00 2001 From: Alek Petuskey Date: Mon, 16 Jan 2023 17:31:34 -0800 Subject: [PATCH] Got rid of nextjs telemetry. (#274) --- pynecone/utils.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pynecone/utils.py b/pynecone/utils.py index 178851522..2f46b2fb4 100644 --- a/pynecone/utils.py +++ b/pynecone/utils.py @@ -15,7 +15,7 @@ import subprocess import sys from collections import defaultdict from pathlib import Path -from subprocess import PIPE +from subprocess import PIPE, DEVNULL, STDOUT from types import ModuleType from typing import _GenericAlias # type: ignore from typing import ( @@ -527,6 +527,15 @@ def run_frontend(app: App, root: Path): # Run the frontend in development mode. console.rule("[bold green]App Running") os.environ["PORT"] = get_config().port + + subprocess.Popen( + [get_package_manager(), "run", "next", "telemetry", "disable"], + cwd=constants.WEB_DIR, + env=os.environ, + stdout=DEVNULL, + stderr=STDOUT, + ) + subprocess.Popen( [get_package_manager(), "run", "dev"], cwd=constants.WEB_DIR, env=os.environ )