I’m getting some errors when trying to build and deploy a specific site built with Nuxt.
6:02:07 PM: [error] ENOENT: no such file or directory, open '/opt/build/repo/.netlify/functions-internal/server/server.json'
6:02:07 PM: [error] ENOENT: no such file or directory, open '/opt/build/repo/.netlify/functions-internal/server/server.json'
6:02:07 PM: ELIFECYCLE Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
6:02:07 PM:
6:02:07 PM: "build.command" failed
I have many other sites using the same technology and this only happens to this one.
Also, when trying on other platforms like Vercel or Render, the build is completed without any errors.
Apparently there’s something going on in the '/opt/build/repo/.netlify/functions-internal/server/server.json'
path, but AFAIK this is managed internally by Netlify (I don’t have this file or path in my source code)
The full build log:
6:00:58 PM: build-image version: afbdb56f962d8349a4f7a51026e76da5fe57aa8e (focal)
6:00:58 PM: buildbot version: afbdb56f962d8349a4f7a51026e76da5fe57aa8e
6:00:58 PM: Building without cache
6:00:58 PM: Starting to prepare the repo for build
6:00:58 PM: No cached dependencies found. Cloning fresh repo
6:00:58 PM: git clone --filter=blob:none https://github.com/stefanobartoletti/stefanobartoletti-links
6:00:59 PM: Preparing Git Reference refs/heads/release
6:01:00 PM: Custom build path detected. Proceeding with the specified path: ''
6:01:01 PM: Starting to install dependencies
6:01:02 PM: mise python@3.8.20 installing
6:01:02 PM: mise python@3.8.20 downloading cpython-3.8.20+20241002-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
6:01:03 PM: mise python@3.8.20 installing cpython-3.8.20+20241002-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
6:01:03 PM: mise python@3.8.20 python --version
6:01:03 PM: mise python@3.8.20 Python 3.8.20
6:01:03 PM: mise python@3.8.20 ✓ installed
6:01:03 PM: Python version set to 3.8
6:01:04 PM: Collecting pipenv
6:01:04 PM: Downloading pipenv-2024.4.0-py3-none-any.whl.metadata (19 kB)
6:01:04 PM: Collecting certifi (from pipenv)
6:01:04 PM: Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
6:01:04 PM: Collecting packaging>=22 (from pipenv)
6:01:04 PM: Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
6:01:04 PM: Requirement already satisfied: setuptools>=67 in /opt/buildhome/.local/share/mise/installs/python/3.8.20/lib/python3.8/site-packages (from pipenv) (70.3.0)
6:01:04 PM: Collecting virtualenv>=20.24.2 (from pipenv)
6:01:04 PM: Downloading virtualenv-20.28.0-py3-none-any.whl.metadata (4.4 kB)
6:01:04 PM: Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.2->pipenv)
6:01:04 PM: Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
6:01:04 PM: Collecting filelock<4,>=3.12.2 (from virtualenv>=20.24.2->pipenv)
6:01:04 PM: Downloading filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)
6:01:05 PM: Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.24.2->pipenv)
6:01:05 PM: Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
6:01:05 PM: Downloading pipenv-2024.4.0-py3-none-any.whl (3.0 MB)
6:01:05 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 39.3 MB/s eta 0:00:00
6:01:05 PM: Downloading packaging-24.2-py3-none-any.whl (65 kB)
6:01:05 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 5.2 MB/s eta 0:00:00
6:01:05 PM: Downloading virtualenv-20.28.0-py3-none-any.whl (4.3 MB)
6:01:05 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 155.6 MB/s eta 0:00:00
6:01:05 PM: Downloading certifi-2024.8.30-py3-none-any.whl (167 kB)
6:01:05 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.3/167.3 kB 13.5 MB/s eta 0:00:00
6:01:05 PM: Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
6:01:05 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 kB 37.7 MB/s eta 0:00:00
6:01:05 PM: Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
6:01:05 PM: Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
6:01:05 PM: Installing collected packages: distlib, platformdirs, packaging, filelock, certifi, virtualenv, pipenv
6:01:06 PM: Successfully installed certifi-2024.8.30 distlib-0.3.9 filelock-3.16.1 packaging-24.2 pipenv-2024.4.0 platformdirs-4.3.6 virtualenv-20.28.0
6:01:06 PM: [notice] A new release of pip is available: 24.1.2 -> 24.3.1
6:01:06 PM: [notice] To update, run: pip install --upgrade pip
6:01:06 PM: Attempting Ruby version 2.7.2, read from environment
6:01:07 PM: Using Ruby version 2.7.2
6:01:08 PM: Started restoring cached go cache
6:01:08 PM: Finished restoring cached go cache
6:01:18 PM: go version go1.19.13 linux/amd64
6:01:19 PM: Using PHP version 8.0
6:01:20 PM: v18.20.5 is already installed.
6:01:20 PM: Now using node v18.20.5 (npm v10.8.2)
6:01:20 PM: Enabling Node.js Corepack
6:01:20 PM: Started restoring cached build plugins
6:01:20 PM: Finished restoring cached build plugins
6:01:20 PM: Started restoring cached corepack dependencies
6:01:20 PM: Finished restoring cached corepack dependencies
6:01:22 PM: No pnpm workspaces detected
6:01:22 PM: Started restoring cached node modules
6:01:22 PM: Finished restoring cached node modules
6:01:22 PM: Installing npm packages using pnpm version 9.12.3
6:01:22 PM: Lockfile is up to date, resolution step is skipped
6:01:22 PM: Progress: resolved 1, reused 0, downloaded 0, added 0
6:01:23 PM: Packages: +1086
6:01:23 PM: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6:01:23 PM: Progress: resolved 1086, reused 0, downloaded 0, added 0
6:01:24 PM: Progress: resolved 1086, reused 0, downloaded 370, added 363
6:01:25 PM: Progress: resolved 1086, reused 0, downloaded 727, added 725
6:01:26 PM: Progress: resolved 1086, reused 0, downloaded 1033, added 1033
6:01:27 PM: Progress: resolved 1086, reused 0, downloaded 1086, added 1086, done
6:01:27 PM: .../core-js@3.39.0/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
6:01:27 PM: .../node_modules/@parcel/watcher install$ node scripts/build-from-source.js
6:01:27 PM: .../sharp@0.32.6/node_modules/sharp install$ (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
6:01:27 PM: .../esbuild@0.21.5/node_modules/esbuild postinstall$ node install.js
6:01:27 PM: .../esbuild@0.24.0/node_modules/esbuild postinstall$ node install.js
6:01:27 PM: .../core-js@3.39.0/node_modules/core-js postinstall: Done
6:01:27 PM: .../node_modules/@parcel/watcher install: Done
6:01:27 PM: .../esbuild@0.21.5/node_modules/esbuild postinstall: Done
6:01:27 PM: .../esbuild@0.24.0/node_modules/esbuild postinstall: Done
6:01:29 PM: .../sharp@0.32.6/node_modules/sharp install: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linux-x64.tar.br
6:01:29 PM: .../sharp@0.32.6/node_modules/sharp install: sharp: Integrity check passed for linux-x64
6:01:30 PM: .../sharp@0.32.6/node_modules/sharp install: Done
6:01:30 PM: dependencies:
6:01:30 PM: + @nuxt/icon 1.9.1
6:01:30 PM: + @nuxt/image 1.8.1
6:01:30 PM: + @nuxtjs/seo 2.0.2
6:01:30 PM: + @nuxtjs/tailwindcss 6.12.2
6:01:30 PM: + @storyblok/nuxt 6.2.0
6:01:30 PM: + daisyui 4.12.20
6:01:30 PM: + lenis 1.1.18
6:01:30 PM: + nuxt 3.14.1592
6:01:30 PM: + posthog-js 1.194.6
6:01:30 PM: devDependencies:
6:01:30 PM: + @nuxt/devtools 1.6.3
6:01:30 PM: + @nuxt/eslint 0.7.2
6:01:30 PM: + @stefanobartoletti/eslint-config 3.0.7
6:01:30 PM: + eslint 9.16.0
6:01:30 PM: > sb-links@ postinstall /opt/build/repo
6:01:30 PM: > nuxt prepare
6:01:31 PM: [info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/css/tailwind.css
6:01:34 PM: [info] Nuxt Icon server bundle mode is set to `local`
6:01:37 PM: [warn] Components directory not found: `/opt/build/repo/storyblok`
6:01:39 PM: [success] Types generated in .nuxt
6:01:39 PM: Done in 17.5s
6:01:40 PM: npm packages installed using pnpm
6:01:40 PM: Successfully installed dependencies
6:01:40 PM: Starting build script
6:01:42 PM: Detected 1 framework(s)
6:01:42 PM: "nuxt" at version "3.14.1592"
6:01:42 PM: Section completed: initializing
6:01:43 PM:
6:01:43 PM: Netlify Build
6:01:43 PM: ────────────────────────────────────────────────────────────────
6:01:43 PM:
6:01:43 PM: ❯ Version
6:01:43 PM: @netlify/build 29.56.1
6:01:43 PM:
6:01:43 PM: ❯ Flags
6:01:43 PM: accountId: 5f52010400ba8a72a52cd905
6:01:43 PM: baseRelDir: true
6:01:43 PM: buildId: 6757223e0f528d11ea67bab2
6:01:43 PM: deployId: 6757223e0f528d11ea67bab4
6:01:43 PM:
6:01:43 PM: ❯ Current directory
6:01:43 PM: /opt/build/repo
6:01:43 PM:
6:01:43 PM: ❯ Config file
6:01:43 PM: No config file was defined: using default values.
6:01:43 PM:
6:01:43 PM: ❯ Context
6:01:43 PM: production
6:01:43 PM:
6:01:43 PM: ❯ Installing plugins
6:01:43 PM: - @netlify/plugin-emails@1.1.1
6:01:44 PM:
6:01:44 PM: ❯ Loading plugins
6:01:44 PM: - @netlify/plugin-emails@1.1.1 from Netlify app
6:01:45 PM:
6:01:45 PM: Build command from Netlify app
6:01:45 PM: ────────────────────────────────────────────────────────────────
6:01:45 PM:
6:01:45 PM: $ pnpm generate
6:01:46 PM: > sb-links@ generate /opt/build/repo
6:01:46 PM: > nuxt generate
6:01:46 PM: [log] Nuxt 3.14.1592 with Nitro 2.10.4
6:01:46 PM: [info] Using Nitro server preset: `static`
6:01:47 PM: [info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/css/tailwind.css
6:01:49 PM: [info] Nuxt Icon server bundle mode is set to `local`
6:01:52 PM: [warn] Components directory not found: `/opt/build/repo/storyblok`
6:01:54 PM: [info] Building client...
6:01:54 PM: [info] vite v5.4.11 building for production...
6:01:54 PM: [info] transforming...
6:01:56 PM: [info] ✓ 201 modules transformed.
6:01:56 PM: [info] rendering chunks...
6:01:56 PM: [info] computing gzip size...
6:01:56 PM: [info] .nuxt/dist/client/manifest.json 4.04 kB │ gzip: 0.63 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/PPObjectSans-Regular.CZTpsVFG.woff2 43.69 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/PPNeueMachina-InktrapRegular.B0WHi8hS.woff2 50.76 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/PPNeueMachina-InktrapMedium.CKNol5Ft.woff2 50.98 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/PPNeueMachina-InktrapUltrabold.0Yatvb7I.woff2 51.76 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/PPNeueMachina-InktrapRegularItalic.SmVvauZc.woff2 53.42 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/entry.Bxwm-EiP.css 0.23 kB │ gzip: 0.16 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/error-500.pUPLBx_6.css 1.88 kB │ gzip: 0.72 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/error-404.swRGPTTT.css 3.56 kB │ gzip: 1.10 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/D0opycBK.js 0.51 kB │ gzip: 0.36 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/DP9ZUakk.js 3.39 kB │ gzip: 1.52 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/CGb7-ZdT.js 3.73 kB │ gzip: 1.68 kB
6:01:56 PM: [info] .nuxt/dist/client/_nuxt/DBdtilGj.js 393.45 kB │ gzip: 136.16 kB
6:01:56 PM: [info] ✓ built in 2.55s
6:01:56 PM: [success] Client built in 2561ms
6:01:56 PM: [info] Building server...
6:01:56 PM: [info] vite v5.4.11 building SSR bundle for production...
6:01:56 PM: [info] transforming...
6:01:57 PM: [info] ✓ 137 modules transformed.
6:01:57 PM: [info] rendering chunks...
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/BackgroundLight-styles.D5A9tI1A.mjs 0.08 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-404-styles.B3yuR8vx.mjs 0.08 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-500-styles.BDbf1LY9.mjs 0.08 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/BackgroundLight-styles.C4ey2Dtf.mjs 0.15 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-404-styles.Bq0aTxWD.mjs 0.15 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-500-styles.qJXlHYSh.mjs 0.15 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/entry-styles.Lh4rUcsF.mjs 0.21 kB
6:01:57 PM: [info] .nuxt/dist/server/styles.mjs 1.79 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-3.mjs-pODMVpw6.js 0.45 kB │ map: 0.11 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/FallbackComponent-C2j8Ky5h-DRVEQDgn.js 0.93 kB │ map: 1.74 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-2.mjs-7g5OUhBx.js 1.08 kB │ map: 0.11 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/WithEmoji-syqozxmW.js 1.40 kB │ map: 0.12 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/BrandedLogo-CfTqxEWF.js 1.52 kB │ map: 0.13 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/Wave-DktHJOOh.js 1.85 kB │ map: 0.12 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/SimpleBlog-CKoSaQjf.js 2.01 kB │ map: 1.46 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-caXBui-w.js 2.10 kB │ map: 0.12 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/island-renderer-DfM2Zwkz.js 2.82 kB │ map: 6.22 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/Frame-6cotc4iW.js 3.25 kB │ map: 0.18 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-BpgbqRwI.js 3.80 kB │ map: 0.12 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-500-C3RYYhXC.js 4.87 kB │ map: 5.50 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/error-404-B6njd32p.js 5.72 kB │ map: 7.24 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/NuxtSeo-D4ygc4I-.js 5.88 kB │ map: 6.29 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/Pergel-B8xeFFZ1.js 7.93 kB │ map: 8.20 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/UnJs-LWrND4eG.js 9.63 kB │ map: 10.41 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/Nuxt-B2CQMPAt.js 15.03 kB │ map: 16.33 kB
6:01:57 PM: [info] .nuxt/dist/server/_nuxt/entry-styles-1.mjs-BNx5QFNF.js 20.87 kB │ map: 0.11 kB
6:01:57 PM: [info] .nuxt/dist/server/server.mjs 149.41 kB │ map: 327.97 kB
6:01:57 PM: [info] ✓ built in 1.03s
6:01:57 PM: [success] Server built in 1033ms
6:01:57 PM: [info] [nitro] Initializing prerenderer
6:02:03 PM: [info] [nitro] Prerendering 4 routes
6:02:03 PM: [log] [nitro] ├─ /__sitemap__/style.xsl (10ms)
6:02:03 PM: [log] [nitro] ├─ /robots.txt (11ms)
6:02:03 PM: [log] [nitro] ├─ /200.html (37ms)
6:02:03 PM: [log] [nitro] ├─ /404.html (37ms)
6:02:06 PM: [log] [nitro] ├─ /sitemap.xml (6ms)
6:02:06 PM: [info] [nitro] Prerendered 5 routes in 7.775 seconds
6:02:06 PM: [success] [nitro] Generated public dist
6:02:07 PM: [info] [nitro] Adding Nitro fallback to `_redirects` to handle all unmatched routes.
6:02:07 PM: [error] ENOENT: no such file or directory, open '/opt/build/repo/.netlify/functions-internal/server/server.json'
6:02:07 PM: [error] ENOENT: no such file or directory, open '/opt/build/repo/.netlify/functions-internal/server/server.json'
6:02:07 PM: ELIFECYCLE Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
6:02:07 PM:
6:02:07 PM: "build.command" failed
6:02:07 PM: ────────────────────────────────────────────────────────────────
6:02:07 PM:
6:02:07 PM: Error message
6:02:07 PM: Command failed with exit code 1: pnpm generate (https://ntl.fyi/exit-code-1)
6:02:07 PM:
6:02:07 PM: Error location
6:02:07 PM: In Build command from Netlify app:
6:02:07 PM: pnpm generate
6:02:07 PM:
6:02:07 PM: Resolved config
6:02:07 PM: build:
6:02:07 PM: base: /opt/build/repo
6:02:07 PM: command: pnpm generate
6:02:07 PM: commandOrigin: ui
6:02:07 PM: environment:
6:02:07 PM: - POSTHOG_API_HOST
6:02:07 PM: - POSTHOG_API_KEY
6:02:07 PM: - SB_API_TOKEN
6:02:07 PM: publish: /opt/build/repo/dist
6:02:07 PM: publishOrigin: ui
6:02:07 PM: plugins:
6:02:07 PM: - inputs: {}
6:02:07 PM: origin: ui
6:02:07 PM: package: '@netlify/plugin-emails'
6:02:08 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
6:02:08 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:02:08 PM: Failing build: Failed to build site
6:02:08 PM: Finished processing build request in 1m10.427s