@MrMaya Thereβs a couple of things odd that I can seeβ¦
Your Build command is just npm install, which is highly unlikely to be correct.
Netlify will run npm install automatically, so you probably want something along the lines of npm run build.
If you can get the site to build locally, determine what command youβre using and what folder the files are in, (or are generated into), and then configure Netlify to do the same.
Thanks so much for your input Nathan, Iβm a bit of a noob, especially when it comes to render. Your help is much appreciated. Iβll look into this and report back
So as mentioned per @nathanmartin I did edit the Build command as well as add the Publish directory. It seems that everything has been set correctly and I donβt get any unusual errors besides some deprecated dependencies. All this to say that when I navigate to the published site link, I still get the error page telling me that Iβve followed a broken link. Any help is appreciated.
Here is my current log from my most recent deployment:
5:04:01 PM: build-image version: 1ca34a93198b041e44214013884c57d146a23fed (focal)
5:04:01 PM: build-image tag: v4.16.4
5:04:01 PM: buildbot version: 5d70ebdb976733297fb4c90b41002389a248e2df
5:04:01 PM: Building without cache
5:04:01 PM: Starting to prepare the repo for build
5:04:02 PM: No cached dependencies found. Cloning fresh repo
5:04:02 PM: git clone --filter=blob:none https://github.com/rickstylz01/portfolio-client-side
5:04:02 PM: Preparing Git Reference refs/heads/main
5:04:03 PM: Parsing package.json dependencies
5:04:04 PM:
β
β― Initial build environment
baseRelDir: true
branch: main
context: production
cwd: /opt/build/repo
featureFlags: []
mode: buildbot
repositoryRoot: /opt/build/repo
siteId: c2b60457-73d4-40eb-944d-8395ee9fb439
β
β― UI build settings
baseRelDir: true
build:
command: npm run build
environment:
- NETLIFY_BUILD_DEBUG
- REACT_APP_BACKEND_URL
publish: src
β
β― Resolved build environment
branch: main
buildDir: /opt/build/repo
context: production
env: []
β
β― Resolved config
build:
command: npm run build
commandOrigin: ui
environment:
- NETLIFY_BUILD_DEBUG
- REACT_APP_BACKEND_URL
publish: /opt/build/repo/src
publishOrigin: ui
5:04:04 PM: Starting build script
5:04:04 PM: Installing dependencies
5:04:04 PM: Python version set to 2.7
5:04:05 PM: v16.19.0 is already installed.
5:04:05 PM: Now using node v16.19.0 (npm v8.19.3)
5:04:05 PM: Enabling Node.js Corepack
5:04:05 PM: Started restoring cached build plugins
5:04:05 PM: Finished restoring cached build plugins
5:04:05 PM: Attempting Ruby version 2.7.2, read from environment
5:04:06 PM: Using Ruby version 2.7.2
5:04:06 PM: Using PHP version 8.0
5:04:06 PM: Started restoring cached corepack dependencies
5:04:06 PM: mv: cannot move '/opt/build/cache/.node/corepack' to '/opt/buildhome/.node/corepack': No such file or directory
5:04:06 PM: Finished restoring cached corepack dependencies
5:04:06 PM: No npm workspaces detected
5:04:06 PM: Started restoring cached node modules
5:04:06 PM: Finished restoring cached node modules
5:04:06 PM: Bypassing sha validation. Running pre & post install scripts
5:04:06 PM: Installing npm packages using npm version 8.19.3
5:04:08 PM: npm WARN ERESOLVE overriding peer dependency
5:04:08 PM: npm WARN While resolving: @react-aria/ssr@3.1.2
5:04:08 PM: npm WARN Found: react@18.0.0
5:04:08 PM: npm WARN node_modules/react
5:04:08 PM: npm WARN react@"^18.0.0" from the root project
5:04:08 PM: npm WARN 14 more (@emotion/react, @restart/hooks, @restart/ui, ...)
5:04:08 PM: npm WARN
5:04:08 PM: npm WARN Could not resolve dependency:
5:04:08 PM: npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-aria/ssr@3.1.2
5:04:08 PM: npm WARN node_modules/@react-aria/ssr
5:04:08 PM: npm WARN @react-aria/ssr@"^3.0.1" from @restart/ui@1.2.0
5:04:08 PM: npm WARN node_modules/@restart/ui
5:04:08 PM: npm WARN
5:04:08 PM: npm WARN Conflicting peer dependency: react@17.0.2
5:04:08 PM: npm WARN node_modules/react
5:04:08 PM: npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-aria/ssr@3.1.2
5:04:08 PM: npm WARN node_modules/@react-aria/ssr
5:04:08 PM: npm WARN @react-aria/ssr@"^3.0.1" from @restart/ui@1.2.0
5:04:08 PM: npm WARN node_modules/@restart/ui
5:04:11 PM: npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
5:04:14 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
5:04:20 PM: added 1451 packages, and audited 1452 packages in 13s
5:04:20 PM: 177 packages are looking for funding
5:04:20 PM: run `npm fund` for details
5:04:20 PM: 12 vulnerabilities (1 low, 10 high, 1 critical)
5:04:20 PM: To address issues that do not require attention, run:
5:04:20 PM: npm audit fix
5:04:20 PM: To address all issues (including breaking changes), run:
5:04:20 PM: npm audit fix --force
5:04:20 PM: Run `npm audit` for details.
5:04:20 PM: npm packages installed
5:04:20 PM: Started restoring cached go cache
5:04:20 PM: Finished restoring cached go cache
5:04:20 PM: Installing Go version 1.16.5 (requested 1.16.5)
5:04:24 PM: unset GOOS;
5:04:24 PM: unset GOARCH;
5:04:24 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64';
5:04:24 PM: export PATH="/opt/buildhome/.gimme/versions/go1.16.5.linux.amd64/bin:${PATH}";
5:04:24 PM: go version >&2;
5:04:24 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.16.5.linux.amd64.env"
5:04:24 PM: go version go1.16.5 linux/amd64
5:04:24 PM: Detected 1 framework(s)
5:04:24 PM: "create-react-app" at version "5.0.1"
5:04:24 PM: Installing missing commands
5:04:24 PM: Verify run directory
5:04:24 PM: Section completed: initializing
5:04:26 PM: β
5:04:26 PM: Netlify Build
5:04:26 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5:04:26 PM: β
5:04:26 PM: β― Version
5:04:26 PM: @netlify/build 29.5.1
5:04:26 PM: β
5:04:26 PM: β― Flags
5:04:26 PM: apiHost: api.netlify.com
5:04:26 PM: baseRelDir: true
5:04:26 PM: branch: main
5:04:26 PM: buildId: 63d5a9df93030355aa9ce1ae
5:04:26 PM: buildbotServerSocket: /tmp/netlify-buildbot-socket
5:04:26 PM: cacheDir: /opt/build/cache
5:04:26 PM: cachedConfigPath: /tmp/netlify_config.json
5:04:26 PM: context: production
5:04:26 PM: cwd: /opt/build/repo
5:04:26 PM: deployId: 63d5a9df93030355aa9ce1b0
5:04:26 PM: edgeFunctionsDistDir: /tmp/edge-63d5a9df93030355aa9ce1b0
5:04:26 PM: featureFlags:
5:04:26 PM: - edge_functions_cache_cli
5:04:26 PM: - edge_functions_system_logger
5:04:26 PM: framework: create-react-app
5:04:26 PM: functionsDistDir: /tmp/zisi-63d5a9df93030355aa9ce1b0
5:04:26 PM: mode: buildbot
5:04:26 PM: nodePath: /opt/buildhome/.nvm/versions/node/v16.19.0/bin/node
5:04:26 PM: repositoryRoot: /opt/build/repo
5:04:26 PM: saveConfig: true
5:04:26 PM: sendStatus: true
5:04:26 PM: siteId: c2b60457-73d4-40eb-944d-8395ee9fb439
5:04:26 PM: statsd:
5:04:26 PM: host: 10.65.147.149
5:04:26 PM: port: 8125
5:04:26 PM: systemLogFile: 3
5:04:26 PM: testOpts:
5:04:26 PM: silentLingeringProcesses: ''
5:04:26 PM: β
5:04:26 PM: β― Current directory
5:04:26 PM: /opt/build/repo
5:04:26 PM: β
5:04:26 PM: β― Config file
5:04:26 PM: No config file was defined: using default values.
5:04:26 PM: β
5:04:26 PM: β― Resolved config
5:04:26 PM: build:
5:04:26 PM: command: npm run build
5:04:26 PM: commandOrigin: ui
5:04:26 PM: environment:
5:04:26 PM: - NETLIFY_BUILD_DEBUG
5:04:26 PM: - REACT_APP_BACKEND_URL
5:04:26 PM: publish: /opt/build/repo/src
5:04:26 PM: publishOrigin: ui
5:04:26 PM: β
5:04:26 PM: β― Context
5:04:26 PM: production
5:04:26 PM: β
5:04:26 PM: 1. Build command from Netlify app
5:04:26 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5:04:26 PM: β
5:04:26 PM: $ npm run build
5:04:26 PM: > portfolio-client-side@0.1.0 build
5:04:26 PM: > react-scripts build
5:04:27 PM: Creating an optimized production build...
5:04:39 PM: Compiled successfully.
5:04:39 PM:
5:04:39 PM: File sizes after gzip:
5:04:39 PM: 93.66 kB build/static/js/main.a9087cbe.js
5:04:39 PM: 36.25 kB build/static/css/main.e0d89c57.css
5:04:39 PM: The project was built assuming it is hosted at /.
5:04:39 PM: You can control this with the homepage field in your package.json.
5:04:39 PM: The build folder is ready to be deployed.
5:04:39 PM: You may serve it with a static server:
5:04:39 PM: npm install -g serve
5:04:39 PM: serve -s build
5:04:39 PM: Find out more about deployment here:
5:04:40 PM: Starting post processing
5:04:39 PM: https://cra.link/deployment
5:04:39 PM: β
5:04:39 PM: (build.command completed in 13.5s)
5:04:40 PM: Post processing - HTML
5:04:39 PM: Build step duration: build.command completed in 13530ms
5:04:39 PM: β
5:04:39 PM: 2. Deploy site
5:04:40 PM: Post processing - header rules
5:04:39 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5:04:39 PM: β
5:04:39 PM: β
5:04:40 PM: Post processing - redirect rules
5:04:39 PM: β― Uploaded config
5:04:39 PM: No netlify.toml
5:04:39 PM: β
5:04:39 PM: β― Uploaded headers
5:04:40 PM: Post processing done
5:04:39 PM: No headers
5:04:39 PM: β
5:04:40 PM: Section completed: postprocessing
5:04:39 PM: β― Uploaded redirects
5:04:39 PM: No redirects
5:04:39 PM: β
5:04:39 PM: Starting to deploy site from 'src'
5:04:39 PM: Calculating files to upload
5:04:40 PM: 0 new files to upload
5:04:40 PM: 0 new functions to upload
5:04:40 PM: Section completed: deploying
5:04:40 PM: Site deploy was successfully initiated
5:04:40 PM: β
5:04:40 PM: (Deploy site completed in 126ms)
5:04:40 PM: Build step duration: Deploy site completed in 126ms
5:04:40 PM: β
5:04:40 PM: Netlify Build Complete
5:04:40 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
5:04:40 PM: β
5:04:41 PM: Site is live β¨
5:04:40 PM: (Netlify Build completed in 13.6s)
5:04:40 PM: Build step duration: Netlify Build completed in 13680ms
5:04:40 PM: Caching artifacts
5:04:40 PM: Started saving node modules
5:04:40 PM: Finished saving node modules
5:04:40 PM: Started saving build plugins
5:04:40 PM: Finished saving build plugins
5:04:40 PM: Started saving pip cache
5:04:40 PM: Finished saving pip cache
5:04:40 PM: Started saving emacs cask dependencies
5:04:40 PM: Finished saving emacs cask dependencies
5:04:40 PM: Started saving maven dependencies
5:04:40 PM: Finished saving maven dependencies
5:04:40 PM: Started saving boot dependencies
5:04:40 PM: Finished saving boot dependencies
5:04:40 PM: Started saving rust rustup cache
5:04:40 PM: Finished saving rust rustup cache
5:04:40 PM: Started saving go dependencies
5:04:40 PM: Finished saving go dependencies
5:04:41 PM: Build script success
5:04:41 PM: Section completed: building
5:04:41 PM: Uploading Cache of size 129.2MB
5:04:42 PM: Section completed: cleanup
5:04:42 PM: Finished processing build request in 41.311s
@MrMaya The previous issue that this ticket was created for is fixed.
Your new issue is that you have your Publish directory set to src, which you can see is shown in both the screenshot of your Build settings and in your Build log.
5:04:39 PM: Starting to deploy site from 'src'
You definitely donβt want that.
Your Build log also shows that itβs building files into build.
5:04:39 PM: File sizes after gzip:
5:04:39 PM: 93.66 kB build/static/js/main.a9087cbe.js
5:04:39 PM: 36.25 kB build/static/css/main.e0d89c57.css
...
04:39 PM: The build folder is ready to be deployed.
Change your Publish directory from src to build to deploy the results of your build.