Home
Support Forums

My SvelteKit local build is OK, but breaks on Netlify

Hi,

My netlify site name is docunight-edu.netlify.app

Deployment of my SvelteKit app fails. It fails as the first attempt to load a svlete file.

This is the error I get:

Could not load /opt/build/repo/src/lib/Navbar/Navbar.svelte (imported by src/routes/__layout.svelte): ENOENT: no such file or directory, open '/opt/build/repo/src/lib/Navbar/Navbar.svelte

All files are there, and there is no uppsercase / lowercase issue.

Here’s the link to the full log

I’d very much appreciate your help!

Hi @akiarostami

Unfortunately I am unable to access your deploy log. If your git repository is private, logs are private also.

Without seeing the repository and the log, it is a little hard to tell. However case-sensitivity, or a naming issue seems most likely here.

Thanks @coelmay. I’m pretty sure it’s not a case-sensitivity or naming issue, but here’s the full log:

6:18:25 PM: Build ready to start
6:18:27 PM: build-image version: 3bcb38c35508b42e9121d4badfe6d8c66fd7a3f0
6:18:27 PM: build-image tag: v4.3.2
6:18:27 PM: buildbot version: 54316104acdcb2e9f0f577467e93bdd6178d217d
6:18:27 PM: Fetching cached dependencies
6:18:27 PM: Failed to fetch cache, continuing with build
6:18:27 PM: Starting to prepare the repo for build
6:18:27 PM: No cached dependencies found. Cloning fresh repo
6:18:27 PM: git clone https://github.com/akiarostami/docunight.edu
6:18:28 PM: Preparing Git Reference refs/heads/master
6:18:29 PM: Parsing package.json dependencies
6:18:29 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: β€˜build’ versus β€˜β€™ in the Netlify UI
6:18:29 PM: Different build command detected, going to use the one specified in the Netlify configuration file: β€˜yarn build’ versus β€˜β€™ in the Netlify UI
6:18:29 PM: Starting build script
6:18:29 PM: Installing dependencies
6:18:29 PM: Python version set to 2.7
6:18:29 PM: Attempting node version β€˜v16.11.0’ from .nvmrc
6:18:30 PM: Downloading and installing node v16.11.0…
6:18:30 PM: Downloading https://nodejs.org/dist/v16.11.0/node-v16.11.0-linux-x64.tar.xz…
6:18:30 PM: Computing checksum with sha256sum
6:18:30 PM: Checksums matched!
6:18:33 PM: Now using node v16.11.0 (npm v8.0.0)
6:18:33 PM: Started restoring cached build plugins
6:18:33 PM: Finished restoring cached build plugins
6:18:33 PM: Attempting ruby version 2.7.2, read from environment
6:18:35 PM: Using ruby version 2.7.2
6:18:35 PM: Using PHP version 8.0
6:18:35 PM: Started restoring cached yarn cache
6:18:35 PM: Finished restoring cached yarn cache
6:18:35 PM: Installing yarn at version 1.22.10
6:18:35 PM: Installing Yarn!
6:18:35 PM: > Downloading tarball…
6:18:35 PM: [1/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz β†’ /tmp/yarn.tar.gz.23HuNXfp4a
6:18:35 PM: % Total % Received % Xferd Average Speed Time Time Time Current
6:18:35 PM: Dload Upload Total Spent Left Speed
6:18:35 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
6:18:35 PM: 100 81 100 81 0 0 450 0 --:–:-- --:–:-- --:–:-- 450
6:18:35 PM: 100 81 100 81 0 0 450 0 --:–:-- --:–:-- --:–:-- 447
6:18:35 PM: 100 95 100 95 0 0 227 0 --:–:-- --:–:-- --:–:-- 227
6:18:35 PM: 100 626 100 626 0 0 1225 0 --:–:-- --:–:-- --:–:-- 1225
6:18:36 PM: 100 1215k 100 1215k 0 0 1960k 0 --:–:-- --:–:-- --:–:-- 1960k
6:18:36 PM: [2/2]: https://yarnpkg.com/downloads/1.22.10/yarn-v1.22.10.tar.gz.asc β†’ /tmp/yarn.tar.gz.23HuNXfp4a.asc
6:18:36 PM: % Total % Received % Xferd Average Speed Time Time Time Current
6:18:36 PM: Dload Upload Total Spent Left Speed
6:18:36 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
6:18:36 PM: 100 85 100 85 0 0 1307 0 --:–:-- --:–:-- --:–:-- 1307
6:18:36 PM: 100 99 100 99 0 0 1064 0 --:–:-- --:–:-- --:–:-- 1064
6:18:36 PM: 100 630 100 630 0 0 5206 0 --:–:-- --:–:-- --:–:-- 5206
6:18:36 PM: 100 832 100 832 0 0 5437 0 --:–:-- --:–:-- --:–:-- 5437
6:18:36 PM: > Verifying integrity…
6:18:36 PM: gpg: Signature made Fri 02 Oct 2020 11:17:27 AM UTC
6:18:36 PM: gpg: using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA
6:18:36 PM: gpg: Good signature from β€œYarn Packaging yarn@dan.cx” [unknown]
6:18:36 PM: gpg: WARNING: This key is not certified with a trusted signature!
6:18:36 PM: gpg: There is no indication that the signature belongs to the owner.
6:18:36 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
6:18:36 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
6:18:36 PM: > GPG signature looks good
6:18:36 PM: > Extracting to ~/.yarn…
6:18:36 PM: > Adding to $PATH…
6:18:36 PM: > Successfully installed Yarn 1.22.10! Please open another terminal where the yarn command will now be available.
6:18:36 PM: No yarn workspaces detected
6:18:36 PM: Started restoring cached node modules
6:18:36 PM: Finished restoring cached node modules
6:18:37 PM: Installing NPM modules using Yarn version 1.22.10
6:18:37 PM: yarn install v1.22.10
6:18:37 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
6:18:37 PM: [1/4] Resolving packages…
6:18:37 PM: [2/4] Fetching packages…
6:18:48 PM: info esbuild-android-arm64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-android-arm64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-android-arm64@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-darwin-64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-darwin-64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-darwin-arm64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-darwin-arm64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-darwin-arm64@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-freebsd-64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-freebsd-64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-freebsd-arm64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-freebsd-arm64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-freebsd-arm64@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-linux-32@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-32@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-arm@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-arm@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-arm64@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-arm64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-mips64le@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-mips64le@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-ppc64le@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-ppc64le@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-netbsd-64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-netbsd-64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-openbsd-64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-openbsd-64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-sunos-64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-sunos-64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-32@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-windows-32@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-32@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-windows-64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-windows-64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-arm64@0.13.8: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-windows-arm64@0.13.8” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-arm64@0.13.8: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info fsevents@2.3.2: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œfsevents@2.3.2” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-android-arm64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-android-arm64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-android-arm64@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-darwin-64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-darwin-64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-darwin-arm64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-darwin-arm64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-darwin-arm64@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-freebsd-64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-freebsd-64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-freebsd-arm64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-freebsd-arm64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-freebsd-arm64@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-linux-32@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-32@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-arm@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-arm@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-arm64@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-arm64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-mips64le@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-mips64le@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-linux-ppc64le@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info β€œesbuild-linux-ppc64le@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-openbsd-64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-openbsd-64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-sunos-64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-sunos-64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-32@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-windows-32@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-32@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: info esbuild-windows-64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-windows-64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-arm64@0.13.4: The platform β€œlinux” is incompatible with this module.
6:18:48 PM: info β€œesbuild-windows-arm64@0.13.4” is an optional dependency and failed compatibility check. Excluding it from installation.
6:18:48 PM: info esbuild-windows-arm64@0.13.4: The CPU architecture β€œx64” is incompatible with this module.
6:18:48 PM: [3/4] Linking dependencies…
6:18:51 PM: [4/4] Building fresh packages…
6:18:51 PM: Done in 13.56s.
6:18:51 PM: NPM modules installed using Yarn
6:18:51 PM: Started restoring cached go cache
6:18:51 PM: Finished restoring cached go cache
6:18:51 PM: Installing Go version 1.14.4
6:18:55 PM: unset GOOS;
6:18:55 PM: unset GOARCH;
6:18:55 PM: export GOROOT=’/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64’;
6:18:55 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64/bin:${PATH}";
6:18:55 PM: go version >&2;
6:18:55 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.14.4.linux.amd64.env"
6:18:55 PM: go version go1.14.4 linux/amd64
6:18:55 PM: Installing missing commands
6:18:55 PM: Verify run directory
6:18:57 PM: ​
6:18:57 PM: ────────────────────────────────────────────────────────────────
6:18:57 PM: Netlify Build
6:18:57 PM: ────────────────────────────────────────────────────────────────
6:18:57 PM: ​
6:18:57 PM: ❯ Version
6:18:57 PM: @netlify/build 18.17.5
6:18:57 PM: ​
6:18:57 PM: ❯ Flags
6:18:57 PM: baseRelDir: true
6:18:57 PM: buildId: 6170bfe170601000088fd53d
6:18:57 PM: deployId: 6170bfe170601000088fd53f
6:18:57 PM: ​
6:18:57 PM: ❯ Current directory
6:18:57 PM: /opt/build/repo
6:18:57 PM: ​
6:18:57 PM: ❯ Config file
6:18:57 PM: /opt/build/repo/netlify.toml
6:18:57 PM: ​
6:18:57 PM: ❯ Context
6:18:57 PM: production
6:18:57 PM: ​
6:18:57 PM: ────────────────────────────────────────────────────────────────
6:18:57 PM: 1. build.command from netlify.toml
6:18:57 PM: ────────────────────────────────────────────────────────────────
6:18:57 PM: ​
6:18:57 PM: $ yarn build
6:18:57 PM: yarn run v1.22.10
6:18:57 PM: $ svelte-kit build
6:18:57 PM: vite v2.6.5 building for production…
6:18:57 PM: transforming…
6:18:58 PM: βœ“ 10 modules transformed.
6:18:58 PM: [vite:load-fallback] Could not load /opt/build/repo/src/lib/Navbar/Navbar.svelte (imported by src/routes/__layout.svelte): ENOENT: no such file or directory, open β€˜/opt/build/repo/src/lib/Navbar/Navbar.svelte’
6:18:58 PM: > Could not load /opt/build/repo/src/lib/Navbar/Navbar.svelte (imported by src/routes/__layout.svelte): ENOENT: no such file or directory, open β€˜/opt/build/repo/src/lib/Navbar/Navbar.svelte’
6:18:58 PM: Error: Could not load /opt/build/repo/src/lib/Navbar/Navbar.svelte (imported by src/routes/__layout.svelte): ENOENT: no such file or directory, open β€˜/opt/build/repo/src/lib/Navbar/Navbar.svelte’
6:18:58 PM: error Command failed with exit code 1.
6:18:58 PM: info Visit yarn run | Yarn for documentation about this command.
6:18:58 PM: ​
6:18:58 PM: ────────────────────────────────────────────────────────────────
6:18:58 PM: β€œbuild.command” failed
6:18:58 PM: ────────────────────────────────────────────────────────────────
6:18:58 PM: ​
6:18:58 PM: Error message
6:18:58 PM: Command failed with exit code 1: yarn build
6:18:58 PM: ​
6:18:58 PM: Error location
6:18:58 PM: In build.command from netlify.toml:
6:18:58 PM: yarn build
6:18:58 PM: ​
6:18:58 PM: Resolved config
6:18:58 PM: build:
6:18:58 PM: command: yarn build
6:18:58 PM: commandOrigin: config
6:18:58 PM: environment:
6:18:58 PM: - VIMEO_AUTH
6:18:58 PM: - VIMEO_ID
6:18:58 PM: - VIMEO_KEY
6:18:58 PM: publish: /opt/build/repo/build
6:18:58 PM: publishOrigin: config
6:18:58 PM: functionsDirectory: /opt/build/repo/functions
6:18:58 PM: Caching artifacts
6:18:58 PM: Started saving node modules
6:18:58 PM: Finished saving node modules
6:18:58 PM: Started saving build plugins
6:18:58 PM: Finished saving build plugins
6:18:58 PM: Started saving yarn cache
6:19:00 PM: Finished saving yarn cache
6:19:00 PM: Started saving pip cache
6:19:01 PM: Finished saving pip cache
6:19:01 PM: Started saving emacs cask dependencies
6:19:01 PM: Finished saving emacs cask dependencies
6:19:01 PM: Started saving maven dependencies
6:19:01 PM: Finished saving maven dependencies
6:19:01 PM: Started saving boot dependencies
6:19:01 PM: Finished saving boot dependencies
6:19:01 PM: Started saving rust rustup cache
6:19:01 PM: Finished saving rust rustup cache
6:19:01 PM: Started saving go dependencies
6:19:02 PM: Finished saving go dependencies
6:19:05 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:19:05 PM: Creating deploy upload records
6:19:05 PM: Failing build: Failed to build site
6:19:05 PM: Failed during stage β€˜building site’: Build script returned non-zero exit code: 2
6:19:05 PM: Finished processing build request in 38.005481702s

I don’t have any issue locally, and I’m on Mac, not Windows, so my OS is case-sensitive as well.

I’m on a Mac, and my file system is not case-sensitive.

Have you checked GitHub to ensure what you see locally is the same as what you see remotely?

well, mine is :slight_smile:

Yes, I checked GitHub, and everything looked fine there.

I want to mention again that this is the very first component that svelte tries to load, and fails. My guess is it’s a setting issue, not a file-specific issue. But I’m sure you know better than I do…

I has previously checked all the settings in Github, but after you mentioned, I checked the folder casing there, and it seems that github had changed the folder name (and not the file name)! Thank you for that. I’m rebuilding the site and it seems to be working!

1 Like