Hi,
I am not able to figure out why my build is failing. Can someone please help?
Github repo:GitHub - Veenakrishna2313/Portfolio-Website
Regards,
Veena
Hi,
I am not able to figure out why my build is failing. Can someone please help?
Github repo:GitHub - Veenakrishna2313/Portfolio-Website
Regards,
Veena
Hi @Veenakrishna,
Thanks for reaching out!
I see when visiting https://wonderful-boba-6c2560.netlify.app/, Page Not Found is displayed. It doesn’t appear you have a redirects in your deploy. Could you try adding a _redirect
or netlify.toml
with the following redirect:
To do this, please add the “single page app” rule in our documentation here:
/* /index.html 200
You can alternatively put the redirects in your netlify.toml file. .
Let us know if you have any questions.
I tried adding redirects, its still the same. Am I doing something wrong with my build commands?
10:46:20 AM: Netlify Build
10:46:20 AM: ────────────────────────────────────────────────────────────────
10:46:20 AM:
10:46:20 AM: ❯ Version
10:46:20 AM: @netlify/build 29.18.0
10:46:20 AM:
10:46:20 AM: ❯ Flags
10:46:20 AM: baseRelDir: true
10:46:20 AM: buildId: 64d12db41c32840bd5059945
10:46:20 AM: deployId: 64d12db41c32840bd5059947
10:46:20 AM:
10:46:20 AM: ❯ Current directory
10:46:20 AM: /opt/build/repo
10:46:20 AM:
10:46:20 AM: ❯ Config file
10:46:20 AM: No config file was defined: using default values.
10:46:20 AM:
10:46:20 AM: ❯ Context
10:46:20 AM: production
10:46:20 AM:
10:46:20 AM: Build command from Netlify app
10:46:20 AM: ────────────────────────────────────────────────────────────────
10:46:20 AM:
10:46:20 AM: $ npm run build
10:46:21 AM: > portfolio-website@0.1.0 build
10:46:21 AM: > react-scripts build
10:46:22 AM: Creating an optimized production build…
10:46:22 AM: Error: error:0308010C:digital envelope routines::unsupported
10:46:22 AM: at new Hash (node:internal/crypto/hash:69:19)
10:46:22 AM: at Object.createHash (node:crypto:133:10)
10:46:22 AM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
10:46:22 AM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
10:46:22 AM: at handleParseError (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:471:10)
10:46:22 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:503:5
10:46:22 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:358:12
10:46:22 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
10:46:22 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
10:46:22 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
10:46:22 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:236:3
10:46:22 AM: at runSyncOrAsync (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
10:46:22 AM: at iterateNormalLoaders (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
10:46:22 AM: at Array. (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
10:46:22 AM: at Storage.finished (/opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
10:46:22 AM: at /opt/build/repo/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
10:46:22 AM: /opt/build/repo/node_modules/react-scripts/scripts/build.js:19
10:46:22 AM: throw err;
10:46:22 AM: ^
10:46:22 AM: Error: error:0308010C:digital envelope routines::unsupported
10:46:22 AM: at new Hash (node:internal/crypto/hash:69:19)
10:46:22 AM: at Object.createHash (node:crypto:133:10)
10:46:22 AM: at module.exports (/opt/build/repo/node_modules/webpack/lib/util/createHash.js:135:53)
10:46:22 AM: at NormalModule._initBuildHash (/opt/build/repo/node_modules/webpack/lib/NormalModule.js:417:16)
10:46:22 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:452:10
10:46:22 AM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:323:13
10:46:22 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
10:46:22 AM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
10:46:22 AM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
10:46:22 AM: at /opt/build/repo/node_modules/babel-loader/lib/index.js:59:103 {
10:46:22 AM: opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
10:46:22 AM: library: ‘digital envelope routines’,
10:46:22 AM: reason: ‘unsupported’,
10:46:22 AM: code: ‘ERR_OSSL_EVP_UNSUPPORTED’
10:46:22 AM: }
10:46:22 AM: Node.js v18.17.0
10:46:22 AM:
10:46:22 AM: build.command failed
10:46:22 AM: ────────────────────────────────────────────────────────────────
10:46:22 AM:
10:46:22 AM: Error message
10:46:22 AM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
10:46:22 AM:
10:46:22 AM: Error location
10:46:22 AM: In Build command from Netlify app:
10:46:22 AM: npm run build
10:46:22 AM:
10:46:22 AM: Resolved config
10:46:22 AM: build:
10:46:22 AM: command: npm run build
10:46:22 AM: commandOrigin: ui
10:46:22 AM: publish: /opt/build/repo/build
10:46:22 AM: publishOrigin: ui
10:46:24 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
10:46:24 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:46:24 AM: Failing build: Failed to build site
10:46:25 AM: Finished processing build request in 44.283s
Hi @Veenakrishna,
Looks like the error with builds is here:
I found this post that may help you resolve the issue:
Please give that a read and see if any of the solutions work for you.
I tried all the 3 methods mentioned. Now its failing in the initializing stage.
3:24:03 PM: build-image version: 20e1f1f500e4cbad9ea8a99bd40807bef3093551 (focal)
3:24:03 PM: buildbot version: a20a151cf9878f371bce46ec4538b86de656a299
3:24:03 PM: Fetching cached dependencies
3:24:03 PM: Failed to fetch cache, continuing with build
3:24:03 PM: Starting to prepare the repo for build
3:24:03 PM: No cached dependencies found. Cloning fresh repo
3:24:03 PM: git clone --filter=blob:none GitHub - Veenakrishna2313/Portfolio-Website
3:24:03 PM: Preparing Git Reference refs/heads/main
3:24:05 PM: Starting to install dependencies
3:24:05 PM: Python version set to 3.8
3:24:05 PM: Attempting Ruby version 2.7.2, read from environment
3:24:06 PM: Using Ruby version 2.7.2
3:24:06 PM: Started restoring cached go cache
3:24:06 PM: Finished restoring cached go cache
3:24:07 PM: Installing Go version 1.19.12 (requested 1.19.x)
3:24:17 PM: Failed during stage ‘Install dependencies’: dependency_installation script returned non-zero exit code: 1
3:24:13 PM: go version go1.19.12 linux/amd64
3:24:14 PM: Using PHP version 8.0
3:24:15 PM: v18.17.0 is already installed.
3:24:15 PM: Now using node v18.17.0 (npm v9.6.7)
3:24:15 PM: Enabling Node.js Corepack
3:24:15 PM: Started restoring cached build plugins
3:24:15 PM: Finished restoring cached build plugins
3:24:15 PM: Started restoring cached corepack dependencies
3:24:15 PM: Finished restoring cached corepack dependencies
3:24:15 PM: No npm workspaces detected
3:24:15 PM: Started restoring cached node modules
3:24:15 PM: Finished restoring cached node modules
3:24:15 PM: Installing npm packages using npm version 9.6.7
3:24:17 PM: npm WARN ERESOLVE overriding peer dependency
3:24:17 PM: npm WARN While resolving: mini-create-react-context@0.4.1
3:24:17 PM: npm WARN Found: react@18.2.0
3:24:17 PM: npm WARN node_modules/react
3:24:17 PM: npm WARN react@^18.2.0 from the root project
3:24:17 PM: npm WARN 7 more (@fortawesome/react-fontawesome, …)
3:24:17 PM: npm WARN
3:24:17 PM: npm WARN Could not resolve dependency:
3:24:17 PM: npm WARN peer react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 from mini-create-react-context@0.4.1
3:24:17 PM: npm WARN node_modules/mini-create-react-context
3:24:17 PM: npm WARN mini-create-react-context@^0.4.0 from react-router@5.2.1
3:24:17 PM: npm WARN node_modules/react-router
3:24:17 PM: npm WARN
3:24:17 PM: npm WARN Conflicting peer dependency: react@17.0.2
3:24:17 PM: npm WARN node_modules/react
3:24:17 PM: npm WARN peer react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 from mini-create-react-context@0.4.1
3:24:17 PM: npm WARN node_modules/mini-create-react-context
3:24:17 PM: npm WARN mini-create-react-context@^0.4.0 from react-router@5.2.1
3:24:17 PM: npm WARN node_modules/react-router
3:24:17 PM: npm ERR! code ERESOLVE
3:24:17 PM: npm ERR! ERESOLVE could not resolve
3:24:17 PM: npm ERR!
3:24:17 PM: npm ERR! While resolving: react-particles-js@3.6.0
3:24:17 PM: npm ERR! Found: react@18.2.0
3:24:17 PM: npm ERR! node_modules/react
3:24:17 PM: npm ERR! react@^18.2.0 from the root project
3:24:17 PM: npm ERR! peer react@>=16.x from @fortawesome/react-fontawesome@0.1.15
3:24:17 PM: npm ERR! node_modules/@fortawesome/react-fontawesome
3:24:17 PM: npm ERR! @fortawesome/react-fontawesome@^0.1.15 from the root project
3:24:17 PM: npm ERR! 6 more (@testing-library/react, react-dom, react-fontawesome, …)
3:24:17 PM: npm ERR!
3:24:17 PM: npm ERR! Could not resolve dependency:
3:24:17 PM: npm ERR! peer react@^16.0.0 from react-particles-js@3.6.0
3:24:17 PM: npm ERR! node_modules/react-particles-js
3:24:17 PM: npm ERR! react-particles-js@^3.6.0 from the root project
3:24:17 PM: npm ERR!
3:24:17 PM: npm ERR! Conflicting peer dependency: react@16.14.0
3:24:17 PM: npm ERR! node_modules/react
3:24:17 PM: npm ERR! peer react@^16.0.0 from react-particles-js@3.6.0
3:24:17 PM: npm ERR! node_modules/react-particles-js
3:24:17 PM: npm ERR! react-particles-js@^3.6.0 from the root project
3:24:17 PM: npm ERR!
3:24:17 PM: npm ERR! Fix the upstream dependency conflict, or retry
3:24:17 PM: npm ERR! this command with --force or --legacy-peer-deps
3:24:17 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
3:24:17 PM: npm ERR!
3:24:17 PM: npm ERR!
3:24:17 PM: npm ERR! For a full report see:
3:24:17 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-08-08T22_24_15_924Z-eresolve-report.txt
3:24:17 PM: npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2023-08-08T22_24_15_924Z-debug-0.log
3:24:17 PM: Error during npm install
3:24:17 PM: Build was terminated: dependency_installation script returned non-zero exit code: 1
3:24:17 PM: Failing build: Failed to install dependencies
I tried upgrading all the packages and the error is still there. Installed npm install --legacy-peer-deps as well , --force. But nothing seems to work
I somehow resolved the the above and the site is published, but its blank with the below message
I went ahead an added the type=“text/jsx” in the script tag in index.html, even then I am seeing a blank screen
Hi @Veenakrishna,
Thanks for the additional details of the issue you’re seeing.
After checking the forums for similar issues, I found this past forum post. I believe the issue with the blank page is caused by this line:
"homepage": "https://veenakrishna2313.github.io/Portfolio-Website/",
within the package.json
. Could you try removing that line, saving then redeploying to see if it resolves the issue?
Omg it worked!! Thank you so much for helping me out and being so patient. Appreciate the help!!
You have a wonderful rest of your day!