Hey Forumsππ»
My site is solux-europe.netlify.app, developed with create-react-app and tailwindcss (I apologise). Iβve been able to successfully build in my local environment, but when I go to deploy with Netlify, it fails with:
6:53:46 PM: build-image version: 0c5695ad82eb9b0111196b4ab87e76fc88dfb543 (focal)
6:53:46 PM: buildbot version: 76db44e982a2928786b57ec42cd88bd82ebbc7f9
6:53:47 PM: Building without cache
6:53:47 PM: Starting to prepare the repo for build
6:53:47 PM: No cached dependencies found. Cloning fresh repo
6:53:47 PM: git clone --filter=blob:none https://github.com/judahhooper/solux-europe
6:53:47 PM: Preparing Git Reference refs/heads/main
6:53:49 PM: Starting to install dependencies
6:53:49 PM: Python version set to 3.8
6:53:49 PM: Attempting Ruby version 2.7.2, read from environment
6:53:50 PM: Using Ruby version 2.7.2
6:53:50 PM: Started restoring cached go cache
6:53:50 PM: Finished restoring cached go cache
6:53:50 PM: go version go1.19.13 linux/amd64
6:53:51 PM: Using PHP version 8.0
6:53:52 PM: v18.18.2 is already installed.
6:53:52 PM: Now using node v18.18.2 (npm v9.8.1)
6:53:52 PM: Enabling Node.js Corepack
6:53:52 PM: Started restoring cached build plugins
6:53:52 PM: Finished restoring cached build plugins
6:53:52 PM: Started restoring cached corepack dependencies
6:53:52 PM: Finished restoring cached corepack dependencies
6:53:52 PM: No npm workspaces detected
6:53:52 PM: Started restoring cached node modules
6:53:52 PM: Finished restoring cached node modules
6:53:52 PM: Installing npm packages using npm version 9.8.1
6:53:56 PM: npm WARN deprecated w3c-hr-time@1.0.2: Use your platform"s native performance.now() and performance.timeOrigin.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
6:53:57 PM: npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
6:53:57 PM: npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
6:53:57 PM: npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
6:53:57 PM: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
6:53:57 PM: npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
6:53:57 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
6:53:57 PM: npm WARN deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0
6:53:58 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
6:54:01 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
6:54:08 PM: added 1892 packages, and audited 1893 packages in 15s
6:54:08 PM: 251 packages are looking for funding
6:54:08 PM: run `npm fund` for details
6:54:08 PM: 14 vulnerabilities (2 moderate, 11 high, 1 critical)
6:54:08 PM: To address issues that do not require attention, run:
6:54:08 PM: npm audit fix
6:54:08 PM: To address all issues (including breaking changes), run:
6:54:08 PM: npm audit fix --force
6:54:08 PM: Run `npm audit` for details.
6:54:08 PM: npm packages installed
6:54:08 PM: Install dependencies script success
6:54:08 PM: Starting build script
6:54:09 PM: Detected 1 framework(s)
6:54:09 PM: "create-react-app" at version "5.0.1"
6:54:09 PM: Section completed: initializing
6:54:10 PM: β
6:54:10 PM: Netlify Build
6:54:10 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:54:10 PM: β
6:54:10 PM: β― Version
6:54:10 PM: @netlify/build 29.23.5
6:54:10 PM: β
6:54:10 PM: β― Flags
6:54:10 PM: baseRelDir: true
6:54:10 PM: buildId: 6539562971c0b4098507cb1c
6:54:10 PM: deployId: 6539562971c0b4098507cb1e
6:54:10 PM: β
6:54:10 PM: β― Current directory
6:54:10 PM: /opt/build/repo
6:54:10 PM: β
6:54:10 PM: β― Config file
6:54:10 PM: No config file was defined: using default values.
6:54:10 PM: β
6:54:10 PM: β― Context
6:54:10 PM: production
6:54:11 PM: β
6:54:11 PM: β― Installing plugins
6:54:11 PM: - @netlify/plugin-emails@1.0.3
6:54:11 PM: - @netlify/plugin-lighthouse@5.0.0
6:54:23 PM: β
6:54:23 PM: β― Loading plugins
6:54:23 PM: - @netlify/plugin-emails@1.0.3 from Netlify app
6:54:23 PM: - @netlify/plugin-lighthouse@5.0.0 from Netlify app
6:54:24 PM: β
6:54:24 PM: Build command from Netlify app
6:54:24 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:54:24 PM: β
6:54:24 PM: $ npm run build
6:54:24 PM: > solux-europe@0.1.0 build
6:54:24 PM: > react-scripts build
6:54:25 PM: Creating an optimized production build...
6:54:28 PM: One of your dependencies, babel-preset-react-app, is importing the
6:54:28 PM: "@babel/plugin-proposal-private-property-in-object" package without
6:54:28 PM: declaring it in its dependencies. This is currently working because
6:54:28 PM: "@babel/plugin-proposal-private-property-in-object" is already in your
6:54:28 PM: node_modules folder for unrelated reasons, but it may break at any time.
6:54:28 PM: babel-preset-react-app is part of the create-react-app project, which
6:54:28 PM: is not maintianed anymore. It is thus unlikely that this bug will
6:54:28 PM: ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
6:54:28 PM: your devDependencies to work around this error. This will make this message
6:54:28 PM: go away.
6:54:52 PM: Failed during stage "building site": Build script returned non-zero exit code: 2
6:54:52 PM: Failed to compile.
6:54:52 PM:
6:54:52 PM: Module not found: Error: Can"t resolve "/Users/judahhooper/Documents/GitHub/solux-europe/src/resources/pexels-photo-356036.jpeg" in "/opt/build/repo/src"
6:54:52 PM: β
6:54:52 PM: "build.command" failed
6:54:52 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:54:52 PM: β
6:54:52 PM: Error message
6:54:52 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
6:54:52 PM: β
6:54:52 PM: Error location
6:54:52 PM: In Build command from Netlify app:
6:54:52 PM: npm run build
6:54:52 PM: β
6:54:52 PM: Resolved config
6:54:52 PM: build:
6:54:52 PM: command: npm run build
6:54:52 PM: commandOrigin: ui
6:54:52 PM: environment:
6:54:52 PM: - CI
6:54:52 PM: - NETLIFY_EMAILS_DIRECTORY
6:54:52 PM: - NETLIFY_EMAILS_SECRET
6:54:52 PM: publish: /opt/build/repo/build
6:54:52 PM: publishOrigin: ui
6:54:52 PM: plugins:
6:54:52 PM: - inputs: {}
6:54:52 PM: origin: ui
6:54:52 PM: package: "@netlify/plugin-emails"
6:54:52 PM: - inputs: {}
6:54:52 PM: origin: ui
6:54:52 PM: package: "@netlify/plugin-lighthouse"
6:54:52 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:54:52 PM: Failing build: Failed to build site
6:54:53 PM: Finished processing build request in 1m6.302s
Which is a really weird error message from my perspective - the path to the image is correct. Is this to do with case sensitivity?
Iβve defined a custom tailwind css utility class βheroβ as an alias for the pexels jpg:
backgroundImage: {
hero: "url('/Users/judahhooper/Documents/GitHub/solux-europe/src/resources/pexels-photo-356036.jpeg')"
},
Which has an instance called in:
<div className="w-screen h-screen bg-no-repeat bg-cover bg-fixed flex items-center justify-center tracking-tighter bg-hero">
The build compiled fine before I changed this from a direct call to the website I sourced this from (Iβm hoping for forgiveness for that one, I have only been doing this for a few months) so itβs likely something to do with that. I had a scan around the forums and havenβt been able to find a similar issue - I am aware of the differences in case sensitivity of MacOS and Netlify - perhaps thatβs playing into it too? any and all input would be appreciated. Let me know if you need further context in the form of more code!