main error: error TS2304: Cannot find name ‘Netlify’
Edge functions for reference: ytify/netlify/edge-functions at main · n-ce/ytify · GitHub
Build was fine on June 2.
New builds from yesterday are failing with this log:
5:25:34 AM: build-image version: 235a96ed6c11cbdf942eed7e70e6802956f9b464 (focal)
5:25:34 AM: buildbot version: 235a96ed6c11cbdf942eed7e70e6802956f9b464
5:25:35 AM: Building without cache
5:25:35 AM: Starting to prepare the repo for build
5:25:35 AM: No cached dependencies found. Cloning fresh repo
5:25:35 AM: git clone --filter=blob:none https://github.com/n-ce/ytify
5:25:35 AM: Preparing Git Reference refs/heads/main
5:25:36 AM: Custom build path detected. Proceeding with the specified path: ''
5:25:36 AM: Custom edge functions path detected. Proceeding with the specified path: 'netlify/edge-functions'
5:25:37 AM: Starting to install dependencies
5:25:38 AM: mise python@3.13.4 install
5:25:38 AM: mise python@3.13.4 download cpython-3.13.4+20250604-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
5:25:38 AM: mise python@3.13.4 extract cpython-3.13.4+20250604-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
5:25:39 AM: mise python@3.13.4 python --version
5:25:39 AM: mise python@3.13.4 Python 3.13.4
5:25:39 AM: mise python@3.13.4 ✓ installed
5:25:40 AM: Python version set to 3.13
5:25:43 AM: Collecting pipenv
5:25:44 AM: Downloading pipenv-2025.0.3-py3-none-any.whl.metadata (17 kB)
5:25:44 AM: Collecting certifi (from pipenv)
5:25:44 AM: Downloading certifi-2025.4.26-py3-none-any.whl.metadata (2.5 kB)
5:25:44 AM: Collecting packaging>=22 (from pipenv)
5:25:44 AM: Downloading packaging-25.0-py3-none-any.whl.metadata (3.3 kB)
5:25:44 AM: Collecting setuptools>=67 (from pipenv)
5:25:44 AM: Downloading setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)
5:25:44 AM: Collecting virtualenv>=20.24.2 (from pipenv)
5:25:44 AM: Downloading virtualenv-20.31.2-py3-none-any.whl.metadata (4.5 kB)
5:25:44 AM: Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.2->pipenv)
5:25:44 AM: Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
5:25:44 AM: Collecting filelock<4,>=3.12.2 (from virtualenv>=20.24.2->pipenv)
5:25:44 AM: Downloading filelock-3.18.0-py3-none-any.whl.metadata (2.9 kB)
5:25:44 AM: Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.24.2->pipenv)
5:25:44 AM: Downloading platformdirs-4.3.8-py3-none-any.whl.metadata (12 kB)
5:25:44 AM: Downloading pipenv-2025.0.3-py3-none-any.whl (2.9 MB)
5:25:44 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 23.5 MB/s eta 0:00:00
5:25:44 AM: Downloading packaging-25.0-py3-none-any.whl (66 kB)
5:25:44 AM: Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB)
5:25:44 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 38.9 MB/s eta 0:00:00
5:25:45 AM: Downloading virtualenv-20.31.2-py3-none-any.whl (6.1 MB)
5:25:45 AM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 66.5 MB/s eta 0:00:00
5:25:45 AM: Downloading certifi-2025.4.26-py3-none-any.whl (159 kB)
5:25:45 AM: Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
5:25:45 AM: Downloading filelock-3.18.0-py3-none-any.whl (16 kB)
5:25:45 AM: Downloading platformdirs-4.3.8-py3-none-any.whl (18 kB)
5:25:45 AM: Installing collected packages: distlib, setuptools, platformdirs, packaging, filelock, certifi, virtualenv, pipenv
5:25:49 AM: Successfully installed certifi-2025.4.26 distlib-0.3.9 filelock-3.18.0 packaging-25.0 pipenv-2025.0.3 platformdirs-4.3.8 setuptools-80.9.0 virtualenv-20.31.2
5:25:49 AM: [notice] A new release of pip is available: 24.3.1 -> 25.1.1
5:25:49 AM: [notice] To update, run: pip install --upgrade pip
5:25:49 AM: Attempting Ruby version 2.7.2, read from environment
5:25:50 AM: Using Ruby version 2.7.2
5:25:51 AM: Started restoring cached go cache
5:25:51 AM: Finished restoring cached go cache
5:25:51 AM: go version go1.19.13 linux/amd64
5:25:51 AM: Using PHP version 8.0
5:25:53 AM: v22.16.0 is already installed.
5:25:54 AM: Now using node v22.16.0 (npm v10.9.2)
5:25:54 AM: Enabling Node.js Corepack
5:25:54 AM: Started restoring cached build plugins
5:25:54 AM: Finished restoring cached build plugins
5:25:54 AM: Started restoring cached corepack dependencies
5:25:54 AM: Finished restoring cached corepack dependencies
5:25:54 AM: No npm workspaces detected
5:25:54 AM: Started restoring cached node modules
5:25:54 AM: Finished restoring cached node modules
5:25:54 AM: Installing npm packages using npm version 10.9.2
5:26:06 AM: npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
5:26:06 AM: npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
5:26:07 AM: npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
5:26:09 AM: added 447 packages, and audited 448 packages in 14s
5:26:09 AM: 133 packages are looking for funding
5:26:09 AM: run `npm fund` for details
5:26:09 AM: found 0 vulnerabilities
5:26:09 AM: npm packages installed
5:26:09 AM: Successfully installed dependencies
5:26:09 AM: Starting build script
5:26:11 AM: Detected 1 framework(s)
5:26:11 AM: "vite" at version "6.3.5"
5:26:11 AM: Section completed: initializing
5:26:13 AM:
5:26:13 AM: Netlify Build
5:26:13 AM: ────────────────────────────────────────────────────────────────
5:26:13 AM:
5:26:13 AM: ❯ Version
5:26:13 AM: @netlify/build 33.4.3
5:26:13 AM:
5:26:13 AM: ❯ Flags
5:26:13 AM: accountId: 602f61fc363779a8cde38c0b
5:26:13 AM: baseRelDir: true
5:26:13 AM: buildId: 68437fe98cd9ee9d854e9b28
5:26:13 AM: deployId: 68437fe98cd9ee9d854e9b2a
5:26:13 AM:
5:26:13 AM: ❯ Current directory
5:26:13 AM: /opt/build/repo
5:26:13 AM:
5:26:13 AM: ❯ Config file
5:26:13 AM: No config file was defined: using default values.
5:26:13 AM:
5:26:13 AM: ❯ Context
5:26:13 AM: production
5:26:13 AM:
5:26:13 AM: ❯ Installing plugins
5:26:13 AM: - @netlify/plugin-lighthouse@6.0.1
5:26:25 AM:
5:26:25 AM: ❯ Loading plugins
5:26:25 AM: - @netlify/plugin-lighthouse@6.0.1 from Netlify app
5:26:27 AM:
5:26:27 AM: Build command from Netlify app
5:26:27 AM: ────────────────────────────────────────────────────────────────
5:26:27 AM:
5:26:27 AM: $ npm run build
5:26:27 AM: > build
5:26:27 AM: > tsc && vite build
5:26:28 AM: netlify/edge-functions/fallback.ts(9,16): error TS2304: Cannot find name 'Netlify'.
5:26:28 AM: netlify/edge-functions/linkPreview.ts(12,16): error TS2304: Cannot find name 'Netlify'.
5:26:29 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
5:26:29 AM:
5:26:29 AM: "build.command" failed
5:26:29 AM: ────────────────────────────────────────────────────────────────
5:26:29 AM:
5:26:29 AM: Error message
5:26:29 AM: Command failed with exit code 2: npm run build (https://ntl.fyi/exit-code-2)
5:26:29 AM:
5:26:29 AM: Error location
5:26:29 AM: In Build command from Netlify app:
5:26:29 AM: npm run build
5:26:29 AM:
5:26:29 AM: Resolved config
5:26:29 AM: build:
5:26:29 AM: base: /opt/build/repo
5:26:29 AM: command: npm run build
5:26:29 AM: commandOrigin: ui
5:26:29 AM: edge_functions: /opt/build/repo/netlify/edge-functions
5:26:29 AM: environment:
5:26:29 AM: - cobalt
5:26:29 AM: - rkeys
5:26:29 AM: publish: /opt/build/repo/dist
5:26:29 AM: publishOrigin: ui
5:26:29 AM: plugins:
5:26:29 AM: - inputs: {}
5:26:29 AM: origin: ui
5:26:29 AM: package: '@netlify/plugin-lighthouse'
5:26:29 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:26:29 AM: Failing build: Failed to build site
5:26:29 AM: Finished processing build request in 54.828s