Having trouble getting react website to build in Netlify from github - reactjs

Created a react app and have it working fine on my local server.I used Github as my source control and have all packages up to date, and a build filed created
I then uploaded it to Netlify and connected it to my Github. Once i tried to have it hosted, it failed the build process.
here is a snippet of the deploy log i get, i cant fit all of it on here
10:05:56 AM: Build ready to start
10:05:59 AM: build-image version: a6bb34428a07e7de82f4df5dfe1843fbde91f670 (focal)
10:05:59 AM: build-image tag: v4.5.1
10:05:59 AM: buildbot version: 047dc2001d6cf9f76ba77ae34521e2065ab5c2bd
10:05:59 AM: Fetching cached dependencies
10:05:59 AM: Failed to fetch cache, continuing with build
10:05:59 AM: Starting to prepare the repo for build
10:05:59 AM: No cached dependencies found. Cloning fresh repo
10:05:59 AM: git clone https://github.com/jmoonoz/Moonoz2.0
10:06:01 AM: Preparing Git Reference refs/heads/master
10:06:02 AM: Parsing package.json dependencies
10:06:02 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus '/build' in the Netlify UI
10:06:03 AM: Starting build script
10:06:03 AM: Installing dependencies
10:06:03 AM: Python version set to 2.7
10:06:03 AM: v16.13.1 is already installed.
10:06:04 AM: Now using node v16.13.1 (npm v8.1.2)
10:06:04 AM: Started restoring cached build plugins
10:06:04 AM: Finished restoring cached build plugins
10:06:04 AM: Attempting ruby version 2.7.2, read from environment
10:06:06 AM: Using ruby version 2.7.2
10:06:06 AM: Using PHP version 8.0
10:06:06 AM: Started restoring cached node modules
10:06:06 AM: Finished restoring cached node modules
10:06:07 AM: Installing NPM modules using NPM version 8.1.2
10:06:26 AM: npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
10:06:26 AM: npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
10:06:26 AM: npm WARN deprecated har-validator#5.1.5: this library is no longer supported
10:06:26 AM: npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
10:06:28 AM: npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
10:06:28 AM: npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
10:06:29 AM: npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
10:06:30 AM: npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
10:06:30 AM: npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
10:06:31 AM: npm WARN deprecated rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
10:06:41 AM: npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
10:06:43 AM: npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
10:06:43 AM: npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
10:06:44 AM: npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
10:06:45 AM: npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
10:06:46 AM: npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
10:06:46 AM: npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
10:06:46 AM: npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
10:06:47 AM: npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
10:06:49 AM: npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
10:06:57 AM: npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
10:10:03 AM: npm ERR! code 1
10:10:03 AM: npm ERR! path /opt/build/repo/node_modules/node-sass
10:10:03 AM: npm ERR! command failed
10:10:03 AM: npm ERR! command sh -c node scripts/build.js
...
10:10:03 AM: npm ERR! gyp ERR! cwd /opt/build/repo/node_modules/node-sass
10:10:03 AM: npm ERR! gyp ERR! node -v v16.13.1
10:10:03 AM: npm ERR! gyp ERR! node-gyp -v v7.1.2
10:10:03 AM: npm ERR! gyp ERR! not ok
10:10:03 AM: npm ERR! Build failed with error code: 1
10:10:03 AM: npm ERR! A complete log of this run can be found in:
10:10:03 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-12-08T18_10_03_338Z-debug.log
10:10:03 AM: Error during NPM install
10:10:03 AM: Build was terminated: Build script returned non-zero exit code: 1
10:10:03 AM: Failing build: Failed to build site
here is my package.json file
{
"name": "moonoz2.0",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.6.1",
"core-js": "^3.19.3",
"emailjs-com": "^3.2.0",
"imagesloaded": "^4.1.4",
"masonry-layout": "^4.2.2",
"node-gyp": "^8.4.1",
"node-sass": "^5.0.0",
"react": "^17.0.2",
"react-bootstrap": "^2.0.0",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"react-router-dom": "^6.0.2",
"react-scripts": "4.0.3",
"tar": "^6.1.11",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

Related

Resolving react dependency issues, vulnerabilities, warnings, conflicts and different versions

I am trying to:
Fix the dependency issues that arise in my react app
Understand why they are happening
Discover how to best approach these kind of issues to address them properly, without doing anything undesirable (such as hiding the warnings, downgrading, using legacy dependencies, etc)
I want to be able to run npm install and for everything to run perfectly.
To better explain my issue, running npm install returns the following:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-side-effect#1.2.0
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN react#"^18.2.0" from the root project
npm WARN 9 more (#fortawesome/react-fontawesome, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-side-effect#1.2.0
npm WARN node_modules/react-document-meta/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-document-meta#3.0.0-beta.2
npm WARN node_modules/react-document-meta
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-side-effect#1.2.0
npm WARN node_modules/react-document-meta/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-document-meta#3.0.0-beta.2
npm WARN node_modules/react-document-meta
removed 1 package, and audited 1573 packages in 5s
223 packages are looking for funding
run `npm fund` for details
9 vulnerabilities (3 moderate, 6 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Which suggests running the audit command, and hence npm audit returns this:
# npm audit report
nth-check <2.0.1
Severity: high
Inefficient Regular Expression Complexity in nth-check - https://github.com/advisories/GHSA-rp65-9cf3-cjxr
fix available via `npm audit fix --force`
Will install react-scripts#2.1.3, which is a breaking change
node_modules/svgo/node_modules/nth-check
css-select <=3.1.0
Depends on vulnerable versions of nth-check
node_modules/svgo/node_modules/css-select
svgo 1.0.0 - 1.3.2
Depends on vulnerable versions of css-select
node_modules/svgo
#svgr/plugin-svgo <=5.5.0
Depends on vulnerable versions of svgo
node_modules/#svgr/plugin-svgo
#svgr/webpack 4.0.0 - 5.5.0
Depends on vulnerable versions of #svgr/plugin-svgo
node_modules/#svgr/webpack
react-scripts >=2.1.4
Depends on vulnerable versions of #svgr/webpack
node_modules/react-scripts
scss-tokenizer *
Severity: moderate
Regular expression denial of service in scss-tokenizer - https://github.com/advisories/GHSA-7mwh-4pqv-wmr8
fix available via `npm audit fix --force`
Will install node-sass#4.5.3, which is a breaking change
node_modules/scss-tokenizer
sass-graph >=2.2.0
Depends on vulnerable versions of scss-tokenizer
node_modules/sass-graph
node-sass >=4.6.0
Depends on vulnerable versions of sass-graph
node_modules/node-sass
9 vulnerabilities (3 moderate, 6 high)
To address all issues (including breaking changes), run:
npm audit fix --force
And then as suggested, running npm audit fix --force, which returns this:
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating node-sass to 4.5.3, which is a SemVer major change.
npm WARN audit Updating react-scripts to 2.1.3, which is a SemVer major change.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-side-effect#1.2.0
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN peer react#">=16.3" from #fortawesome/react-fontawesome#0.2.0
npm WARN node_modules/#fortawesome/react-fontawesome
npm WARN #fortawesome/react-fontawesome#"^0.2.0" from the root project
npm WARN 8 more (#testing-library/react, react-document-meta, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-side-effect#1.2.0
npm WARN node_modules/react-document-meta/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-document-meta#3.0.0-beta.2
npm WARN node_modules/react-document-meta
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-side-effect#1.2.0
npm WARN node_modules/react-document-meta/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-document-meta#3.0.0-beta.2
npm WARN node_modules/react-document-meta
npm WARN deprecated fsevents#1.2.4: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated topo#2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated eslint-loader#2.1.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated hoek#4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated sane#2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated html-webpack-plugin#4.0.0-alpha.2: please switch to a stable version
npm WARN deprecated babel-eslint#9.0.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated joi#11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated uglify-es#3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated core-js#2.6.4: core-js#<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c /var/folders/xb/j8892d016d774vwslfyy7q500000gn/T/postinstall6573775593.sh
npm ERR! Building: /Users/nick/.nvm/versions/node/v18.3.0/bin/node /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli '/Users/nick/.nvm/versions/node/v18.3.0/bin/node',
npm ERR! gyp verb cli '/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#18.3.0 | darwin | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` succeeded python2 /Library/Frameworks/Python.framework/Versions/2.7/bin/python2
npm ERR! gyp verb check python version `/Library/Frameworks/Python.framework/Versions/2.7/bin/python2 -c "import sys; print "2.7.13
npm ERR! gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.3.0
npm ERR! gyp verb command install [ '18.3.0' ]
npm ERR! gyp verb install input version string "18.3.0"
npm ERR! gyp verb install installing version: 18.3.0
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 18.3.0
npm ERR! gyp verb build dir attempting to create "build" dir: /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass/build
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass/build/config.gypi
npm ERR! (node:41219) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp verb config.gypi checking for gypi file: /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/2.7/bin/python2
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/nick/.node-gyp/18.3.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/nick/.node-gyp/18.3.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/nick/.node-gyp/18.3.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR!
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR!
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/Users/nick/.nvm/versions/node/v18.3.0/bin/node" "/Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/nick/Documents/Coding/Projects/Practice/Start-Authed/client/node_modules/node-sass
npm ERR! gyp ERR! node -v v18.3.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nick/.npm/_logs/2022-07-09T13_00_06_088Z-debug-0.log
I can get rid of most errors by running this: npm install --legacy-peer-deps - an undesirable command - which still returns some vulnerability warnings:
removed 57 packages, and audited 1516 packages in 7s
223 packages are looking for funding
run `npm fund` for details
9 vulnerabilities (3 moderate, 6 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
So I am a little stuck as to how to fix these issues properly.
Here is my package.json file:
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#fortawesome/fontawesome-svg-core": "^6.1.1",
"#fortawesome/free-solid-svg-icons": "^6.1.1",
"#fortawesome/react-fontawesome": "^0.2.0",
"#hookform/resolvers": "^2.9.5",
"#testing-library/jest-dom": "^5.16.4",
"#testing-library/react": "^13.3.0",
"#testing-library/user-event": "^14.2.1",
"#types/jest": "^28.1.4",
"#types/node": "^18.0.3",
"#types/react": "^18.0.15",
"#types/react-dom": "^18.0.6",
"node-sass": "^7.0.1",
"react": "^18.2.0",
"react-document-meta": "^3.0.0-beta.2",
"react-dom": "^18.2.0",
"react-hook-form": "^7.33.1",
"react-modal": "^3.15.1",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"typescript": "^4.7.4",
"web-vitals": "^2.1.4",
"yup": "^0.32.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write ."
},
"prettier": {
"printWidth": 120,
"useTabs": false,
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#types/react-document-meta": "^3.0.2",
"#types/react-modal": "^3.13.1",
"jest-watch-typeahead": "^1.1.0",
"msw": "^0.43.1",
"prettier": "2.7.1"
}
}
Being prompted with 9 vulnerabilities makes me concerned that something is not right. From my understanding (which may be incorrect), I am assuming that some packages require a version of react that is older than the current version (might be 18 or something), which makes me assume that downgrading might fix them, but then the consequence of that is presumably I’ll never be able to update my version of react, which would suck. Downgrading also does not feel right.
This might be relevant: I am also getting this warning in the JS console even though componentWillMount is not being used, which makes me believe that an outdated library is using it.
Does anyone know why these errors keep occurring, and how to actually fix or at least go about them properly, without having to downgrade or do anything that’s undesirable? And should I worry about these issues? Is it common to see issues after an npm install?
Note that moving react-scripts into devDependencies does nothing, as suggested by this post.
This is how you should read dependency issues:
// this line states that there's an issue with a 'peer' dependency which is a dependency of your dependency. 'overriding' means you explicitly specified a dependency version higher than a peer dependency
npm WARN ERESOLVE overriding peer dependency
//this is the dependency that has an issue
npm WARN While resolving: react-side-effect#1.2.0
// this is what was found in your project
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN react#"^18.2.0" from the root project
npm WARN 9 more (#fortawesome/react-fontawesome, ...)
npm WARN
// this is what your failed dependency wants react that is no more than version 16, you specified version 18 explicitly which is where the conflict occurs
npm WARN Could not resolve dependency:
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from react-
side-effect#1.2.0
//these are the modules that your dependency uses that requires the above version
npm WARN node_modules/react-document-meta/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-document-meta#3.0.0-beta.2
npm WARN node_modules/react-document-meta
npm WARN
npm WARN Conflicting peer dependency: react#16.14.0
npm WARN node_modules/react
npm WARN peer react#"^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0" from
react-side-effect#1.2.0
npm WARN node_modules/react-document-meta/node_modules/react-side-effect
npm WARN react-side-effect#"^1.1.0" from react-document-meta#3.0.0-
beta.2
// this is the named dependency in your file that causes the issue
npm WARN node_modules/react-document-meta
Now that we know that react 18 does not work with react-document-meta
we should either go down to the required version and again repeat the process
or
lift up the dependency version and hope that the newer version has a fix
if we look at npm registry for the dependency we can see that the module hasnt been last published 4 years ago, so lifting the version up from this wont be possible. [Looking at the github project page people have similar issues] (https://github.com/kodyl/react-document-meta/issues/48) and recommend moving to react-helmet.
in your case we can revert react 18 to 16 latest and continue using it or transition to using something else as theres no choice unless you want to fork the dependency and work on it yourself.
further:
npm audit describes known issues with the node packages that you are using, you can take a look and see if any of the deployed dependencies have significant issues to your work then you should try and lift them up, otherwise you can ignore. Sometimes dependencies cannot be lifted up and you will have to change to using something else as its not being maintained anymore.
npm fix will attempt automatically updating those vulnerable dependencies but fails in your case as your version mismatch prevents it from proceeding.
you should look into specifying npm versions and allow for minor versions or later versions automatically https://docs.npmjs.com/about-semantic-versioning
you can run npm outdated to check for outdated node versions in your code then npm update to attempt updating versions
if you modify the package.json manually without doing npm add or npm update then theres no dependency checking which can cause issues like yours, I'd recommend to always use npm add <name>, npm uninstall <name> and npm update <name> to avoid issues
finally this is a fixed package.json (working on my machine but may not work code-wise), I'd suggest upgrading everything and moving to react-helmet
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#fortawesome/fontawesome-svg-core": "^6.1.1",
"#fortawesome/free-solid-svg-icons": "^6.1.1",
"#fortawesome/react-fontawesome": "^0.2.0",
"#hookform/resolvers": "^2.9.5",
"#testing-library/jest-dom": "^5.16.4",
"#testing-library/react": "^11",
"#testing-library/user-event": "^14.2.1",
"#types/jest": "^28.1.4",
"#types/node": "^18.0.3",
"#types/react": "^16",
"#types/react-dom": "^16.0.0",
"node-sass": "^7.0.1",
"react": "^16.0.0",
"react-document-meta": "^3.0.0-beta.5",
"react-dom": "^16.0.0",
"react-hook-form": "^7.33.1",
"react-modal": "^3.15.1",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"typescript": "^4.7.4",
"web-vitals": "^2.1.4",
"yup": "^0.32.11"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write ."
},
"prettier": {
"printWidth": 120,
"useTabs": false,
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#types/react-document-meta": "^3.0.2",
"#types/react-modal": "^3.13.1",
"jest-watch-typeahead": "^1.1.0",
"msw": "^0.43.1",
"prettier": "2.7.1"
}
}

React application build error from AWS Amplify

Hello I am trying to deploy my react app on Amplify by connecting it to my GitHub branch. It gives me a build error but I don't think I am doing anything wrong. The same GitHub branch is connected to Netlify and over there is works completely fine.
These are the build setting on Amplify
version: 1
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
packages.json
{
"name": "x-spreadsheet-react",
"version": "1.0.0",
"description": "",
"keywords": [],
"main": "src/index.js",
"dependencies": {
"axios": "^0.26.1",
"react": "16.12.0",
"react-apexcharts": "^1.3.9",
"react-dom": "16.12.0",
"react-hot-toast": "^2.2.0",
"react-icons": "^4.3.1",
"react-redux": "^7.2.6",
"react-router-dom": "^5.3.0",
"react-scripts": "3.0.1",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.1",
"x-data-spreadsheet": "1.1.6",
"xlsx": "^0.16.5"
},
"devDependencies": {
"typescript": "3.8.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
Node version 16.8.0
and this the log file I get after the build error
2022-03-13T09:28:23.339Z [INFO]: Git SSH Key acquired
2022-03-13T09:28:23.415Z [INFO]: # Cloning repository: git#github.com:ahsan44411/excel.git
2022-03-13T09:28:23.638Z [INFO]: Agent pid 135
2022-03-13T09:28:23.661Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2022-03-13T09:28:24.096Z [INFO]: Cloning into 'excel'...
2022-03-13T09:28:24.521Z [INFO]: Warning: Permanently added the ECDSA host key for IP address '140.82.114.3' to the list of known hosts.
2022-03-13T09:28:25.062Z [INFO]: # Switching to commit: 1010ba54dd4ab706c46f3f593ccd68a2082d2fd5
2022-03-13T09:28:25.090Z [INFO]: Agent pid 148
2022-03-13T09:28:25.091Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
Note: switching to '1010ba54dd4ab706c46f3f593ccd68a2082d2fd5'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1010ba5 Delete package-lock.json
2022-03-13T09:28:25.133Z [INFO]: Successfully cleaned up Git credentials
2022-03-13T09:28:25.133Z [INFO]: # Checking for Git submodules at: /codebuild/output/src366852352/src/excel/.gitmodules
2022-03-13T09:28:25.155Z [INFO]: # Retrieving environment cache...
2022-03-13T09:28:25.182Z [INFO]: # Retrieved environment cache
2022-03-13T09:28:25.182Z [INFO]: ---- Setting Up SSM Secrets ----
2022-03-13T09:28:25.182Z [INFO]: SSM params {"Path":"/amplify/d1x5u7awp8tlr9/main/","WithDecryption":true}
2022-03-13T09:28:25.210Z [WARNING]: !Failed to set up process.env.secrets
2022-03-13T09:28:25.211Z [INFO]: No live updates for this build run
2022-03-13T09:28:25.218Z [INFO]: # Retrieving cache...
2022-03-13T09:28:25.251Z [INFO]: # Extracting cache...
2022-03-13T09:28:25.258Z [INFO]: # Extraction completed
2022-03-13T09:28:53.823Z [INFO]: ## Starting Backend Build
## Checking for associated backend environment...
## No backend environment association found, continuing...
## Completed Backend Build
## Starting Frontend Build
# Starting phase: preBuild
# Executing command: npm install
2022-03-13T09:28:57.866Z [WARNING]: npm WARN deprecated redux-devtools-extension#2.13.9: Package moved to #redux-devtools/extension.
2022-03-13T09:28:58.099Z [WARNING]: npm WARN deprecated babel-eslint#10.0.1: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
2022-03-13T09:28:58.754Z [WARNING]: npm WARN deprecated eslint-loader#2.1.2: This loader has been deprecated. Please use eslint-webpack-plugin
2022-03-13T09:28:59.077Z [WARNING]: npm WARN
2022-03-13T09:28:59.077Z [WARNING]: deprecated html-webpack-plugin#4.0.0-beta.5: please switch to a stable version
2022-03-13T09:29:00.028Z [WARNING]: npm WARN
2022-03-13T09:29:00.028Z [WARNING]: deprecated fsevents#2.0.6: "Please update to latest v2.3 or v2.2"
2022-03-13T09:29:03.426Z [WARNING]: npm
2022-03-13T09:29:03.428Z [WARNING]: WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
2022-03-13T09:29:05.775Z [WARNING]: npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
2022-03-13T09:29:07.006Z [WARNING]: npm WARN
2022-03-13T09:29:07.008Z [WARNING]: deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
2022-03-13T09:29:07.088Z [WARNING]: npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
2022-03-13T09:29:08.379Z [WARNING]: npm WARN deprecated
2022-03-13T09:29:08.379Z [WARNING]: fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
2022-03-13T09:29:09.392Z [WARNING]: npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
2022-03-13T09:29:09.400Z [WARNING]: npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
2022-03-13T09:29:09.735Z [WARNING]: npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
2022-03-13T09:29:10.388Z [WARNING]: npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
2022-03-13T09:29:10.837Z [WARNING]: npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
2022-03-13T09:29:11.417Z [WARNING]: npm WARN deprecated har-validator#5.1.5: this library is no longer supported
2022-03-13T09:29:11.607Z [WARNING]: npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
2022-03-13T09:29:13.294Z [WARNING]: npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
2022-03-13T09:29:13.339Z [WARNING]: npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
2022-03-13T09:29:13.340Z [WARNING]: npm WARN deprecated
2022-03-13T09:29:13.340Z [WARNING]: #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
2022-03-13T09:29:13.341Z [WARNING]: npm WARN
2022-03-13T09:29:13.341Z [WARNING]: deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
2022-03-13T09:29:14.648Z [WARNING]: npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
2022-03-13T09:29:14.662Z [WARNING]: npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
2022-03-13T09:29:15.208Z [WARNING]: npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
2022-03-13T09:29:31.947Z [INFO]: > core-js#2.6.12 postinstall /codebuild/output/src366852352/src/excel/node_modules/babel-polyfill/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
2022-03-13T09:29:32.001Z [INFO]: [96mThank you for using core-js ([94m https://github.com/zloirock/core-js [96m) for polyfilling JavaScript standard library![0m
[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: [0m
[96m>[94m https://opencollective.com/core-js [0m
[96m>[94m https://www.patreon.com/zloirock [0m
[96mAlso, the author of core-js ([94m https://github.com/zloirock [96m) is looking for a good job -)[0m
2022-03-13T09:29:32.008Z [INFO]: > core-js#2.6.12 postinstall /codebuild/output/src366852352/src/excel/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
2022-03-13T09:29:32.077Z [INFO]: > core-js#3.21.1 postinstall /codebuild/output/src366852352/src/excel/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
2022-03-13T09:29:32.128Z [INFO]: [96mThank you for using core-js ([94m https://github.com/zloirock/core-js [96m) for polyfilling JavaScript standard library![0m
[96mThe project needs your help! Please consider supporting of core-js:[0m
[96m>[94m https://opencollective.com/core-js [0m
[96m>[94m https://patreon.com/zloirock [0m
[96m>[94m https://paypal.me/zloirock [0m
[96m>[94m bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz [0m
[96mAlso, the author of core-js ([94m https://github.com/zloirock [96m) is looking for a good job -)[0m
2022-03-13T09:29:32.412Z [INFO]: > x-data-spreadsheet#1.1.6 postinstall /codebuild/output/src366852352/src/excel/node_modules/x-data-spreadsheet
> opencollective-postinstall
2022-03-13T09:29:32.461Z [INFO]: [96m[1mThank you for using x-data-spreadsheet![96m[1m
2022-03-13T09:29:32.461Z [INFO]: [0m[96mIf you rely on this package, please consider supporting our open collective:[22m[39m
> [94mhttps://opencollective.com/x-spreadsheet/donate[0m
2022-03-13T09:29:33.130Z [WARNING]: npm notice
2022-03-13T09:29:33.131Z [WARNING]: created a lockfile as package-lock.json. You should commit this file.
2022-03-13T09:29:33.137Z [WARNING]: npm
2022-03-13T09:29:33.137Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.6 (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2022-03-13T09:29:33.142Z [WARNING]: npm
2022-03-13T09:29:33.142Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2022-03-13T09:29:33.148Z [WARNING]: npm
2022-03-13T09:29:33.148Z [WARNING]: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2022-03-13T09:29:33.152Z [WARNING]: npm WARN
2022-03-13T09:29:33.152Z [WARNING]: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2022-03-13T09:29:33.158Z [WARNING]: npm WARN
2022-03-13T09:29:33.158Z [WARNING]: react-apexcharts#1.4.0 requires a peer of apexcharts#^3.18.0 but none is installed. You must install peer dependencies yourself.
2022-03-13T09:29:33.164Z [WARNING]: npm WARN
2022-03-13T09:29:33.164Z [WARNING]: #babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining#7.16.7 requires a peer of #babel/core#^7.13.0 but none is installed. You must install peer dependencies yourself.
2022-03-13T09:29:33.172Z [WARNING]: npm WARN
2022-03-13T09:29:33.172Z [WARNING]: #babel/plugin-proposal-class-static-block#7.17.6 requires a peer of #babel/core#^7.12.0 but none is installed. You must install peer dependencies yourself.
2022-03-13T09:29:33.177Z [WARNING]: npm
2022-03-13T09:29:33.177Z [WARNING]: WARN x-spreadsheet-react#1.0.0 No description
2022-03-13T09:29:33.182Z [WARNING]: npm
2022-03-13T09:29:33.182Z [WARNING]: WARN x-spreadsheet-react#1.0.0 No repository field.
2022-03-13T09:29:33.187Z [WARNING]: npm
2022-03-13T09:29:33.187Z [WARNING]: WARN x-spreadsheet-react#1.0.0 No license field.
2022-03-13T09:29:33.187Z [WARNING]:
2022-03-13T09:29:33.192Z [INFO]: added 1568 packages from 764 contributors and audited 1573 packages in 37.866s
2022-03-13T09:29:33.686Z [INFO]: 72 packages are looking for funding
run `npm fund` for details
2022-03-13T09:29:33.687Z [INFO]: found 72 vulnerabilities (3 low, 59 moderate, 9 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
2022-03-13T09:29:33.722Z [INFO]: # Completed phase: preBuild
# Starting phase: build
2022-03-13T09:29:33.722Z [INFO]: # Executing command: npm run build
2022-03-13T09:29:33.899Z [INFO]: > x-spreadsheet-react#1.0.0 build /codebuild/output/src366852352/src/excel
> react-scripts build
2022-03-13T09:29:34.880Z [INFO]: Creating an optimized production build...
2022-03-13T09:29:43.407Z [INFO]: Failed to compile.
2022-03-13T09:29:43.409Z [INFO]: ./node_modules/react-apexcharts/dist/react-apexcharts.min.js
Cannot find module: 'apexcharts/dist/apexcharts.common'. Make sure this package is installed.
You can install this package by running: npm install apexcharts/dist/apexcharts.common.
2022-03-13T09:29:43.436Z [WARNING]: npm
2022-03-13T09:29:43.437Z [WARNING]: ERR! code ELIFECYCLE
npm ERR! errno 1
2022-03-13T09:29:43.439Z [WARNING]: npm
2022-03-13T09:29:43.439Z [WARNING]: ERR! x-spreadsheet-react#1.0.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the x-spreadsheet-react#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2022-03-13T09:29:43.443Z [WARNING]:
2022-03-13T09:29:43.443Z [WARNING]: npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-13T09_29_43_439Z-debug.log
2022-03-13T09:29:43.443Z [HELP]: Outputting the npm debug log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/root/.nvm/versions/node/v14.18.1/bin/node',
1 verbose cli '/root/.nvm/versions/node/v14.18.1/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm#6.14.15
3 info using node#v14.18.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle x-spreadsheet-react#1.0.0~prebuild: x-spreadsheet-react#1.0.0
6 info lifecycle x-spreadsheet-react#1.0.0~build: x-spreadsheet-react#1.0.0
7 verbose lifecycle x-spreadsheet-react#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle x-spreadsheet-react#1.0.0~build: PATH: /root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/codebuild/output/src366852352/src/excel/node_modules/.bin:/usr/local/rvm/gems/ruby-2.4.6/bin:/usr/local/rvm/gems/ruby-2.4.6#global/bin:/usr/local/rvm/rubies/ruby-2.4.6/bin:/usr/local/rvm/bin:/root/.nvm/versions/node/v14.18.1/bin:/root/.local/bin:/root/.local/bin:/root/.local/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.dotnet/tools
9 verbose lifecycle x-spreadsheet-react#1.0.0~build: CWD: /codebuild/output/src366852352/src/excel
10 silly lifecycle x-spreadsheet-react#1.0.0~build: Args: [ '-c', 'react-scripts build' ]
11 silly lifecycle x-spreadsheet-react#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle x-spreadsheet-react#1.0.0~build: Failed to exec build script
13 verbose stack Error: x-spreadsheet-react#1.0.0 build: `react-scripts build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1058:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid x-spreadsheet-react#1.0.0
15 verbose cwd /codebuild/output/src366852352/src/excel
16 verbose Linux 4.14.252-195.483.amzn2.x86_64
17 verbose argv "/root/.nvm/versions/node/v14.18.1/bin/node" "/root/.nvm/versions/node/v14.18.1/bin/npm" "run" "build"
18 verbose node v14.18.1
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error x-spreadsheet-react#1.0.0 build: `react-scripts build`
22 error Exit status 1
23 error Failed at the x-spreadsheet-react#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
2022-03-13T09:29:43.446Z [ERROR]: !!! Build failed
2022-03-13T09:29:43.446Z [ERROR]: !!! Non-Zero Exit Code detected
2022-03-13T09:29:43.447Z [INFO]: # Starting environment caching...
2022-03-13T09:29:43.447Z [INFO]: # Environment caching completed
Terminating logging...
Has anyone faced the same issue? I have been stuck for a while and can not find a solution.
Thanks

NPM error when deploying react app to netlify

I'm trying to deploy my website to netlify, I keep getting this error
9:59:45 PM: npm ERR! npm ERR! code EINVALIDTAGNAME
9:59:45 PM: npm ERR! npm ERR! Invalid tag name "^>= 4": Tags may not have any characters that encodeURIComponent encodes.
This is the complete failed deploy log on netlify
9:58:10 PM: Build ready to start
9:58:12 PM: build-image version: 3bcb38c35508b42e9121d4badfe6d8c66fd7a3f0
9:58:12 PM: build-image tag: v4.3.2
9:58:12 PM: buildbot version: 5f1a3c6e77d89b95b77370734ae1aecf3a51e9c1
9:58:12 PM: Fetching cached dependencies
9:58:12 PM: Failed to fetch cache, continuing with build
9:58:12 PM: Starting to prepare the repo for build
9:58:12 PM: No cached dependencies found. Cloning fresh repo
9:58:12 PM: git clone https://github.com/Abudibro/sneaker-select
9:58:20 PM: Preparing Git Reference refs/heads/main
9:58:22 PM: Parsing package.json dependencies
9:58:22 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus 'build/' in the Netlify UI
9:58:22 PM: Starting build script
9:58:22 PM: Installing dependencies
9:58:22 PM: Python version set to 2.7
9:58:23 PM: Downloading and installing node v16.12.0...
9:58:23 PM: Downloading https://nodejs.org/dist/v16.12.0/node-v16.12.0-linux-x64.tar.xz...
9:58:23 PM: Computing checksum with sha256sum
9:58:23 PM: Checksums matched!
9:58:26 PM: Now using node v16.12.0 (npm v8.1.0)
9:58:26 PM: Started restoring cached build plugins
9:58:26 PM: Finished restoring cached build plugins
9:58:26 PM: Attempting ruby version 2.7.2, read from environment
9:58:28 PM: Using ruby version 2.7.2
9:58:28 PM: Using PHP version 8.0
9:58:28 PM: Started restoring cached node modules
9:58:29 PM: Finished restoring cached node modules
9:58:29 PM: Installing NPM modules using NPM version 8.1.0
9:58:31 PM: npm WARN old lockfile
9:58:31 PM: npm WARN old lockfile The package-lock.json file was created with an old version of npm,
9:58:31 PM: npm WARN old lockfile so supplemental metadata must be fetched from the registry.
9:58:31 PM: npm WARN old lockfile
9:58:31 PM: npm WARN old lockfile This is a one-time fix-up, please be patient...
9:58:31 PM: npm WARN old lockfile
9:58:56 PM: npm WARN old lockfile Error: git dep preparation failed
9:58:56 PM: npm WARN old lockfile at ChildProcess.<anonymous> (/opt/buildhome/.nvm/versions/node/v16.12.0/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
9:58:56 PM: npm WARN old lockfile at ChildProcess.emit (node:events:390:28)
9:58:56 PM: npm WARN old lockfile at maybeClose (node:internal/child_process:1064:16)
9:58:56 PM: npm WARN old lockfile at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
9:58:56 PM: npm WARN old lockfile Could not fetch metadata for hero-slider#git+ssh://git#github.com/Abudibro/hero-slider.git#f13601fe5cb15b0a1c2f35f246d9342f4f3012e8 Error: git dep preparation failed
9:58:56 PM: npm WARN old lockfile at ChildProcess.<anonymous> (/opt/buildhome/.nvm/versions/node/v16.12.0/lib/node_modules/npm/node_modules/#npmcli/promise-spawn/index.js:64:27)
9:58:56 PM: npm WARN old lockfile at ChildProcess.emit (node:events:390:28)
9:58:56 PM: npm WARN old lockfile at maybeClose (node:internal/child_process:1064:16)
9:58:56 PM: npm WARN old lockfile at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {
9:58:56 PM: npm WARN old lockfile cmd: '/opt/buildhome/.nvm/versions/node/v16.12.0/bin/node',
9:58:56 PM: npm WARN old lockfile args: [
9:58:56 PM: npm WARN old lockfile '/opt/buildhome/.nvm/versions/node/v16.12.0/lib/node_modules/npm/bin/npm-cli.js',
9:58:56 PM: npm WARN old lockfile 'install',
9:58:56 PM: npm WARN old lockfile '--force',
9:58:56 PM: npm WARN old lockfile '--cache=/opt/buildhome/.npm',
9:58:56 PM: npm WARN old lockfile '--prefer-offline=false',
9:58:56 PM: npm WARN old lockfile '--prefer-online=false',
9:58:56 PM: npm WARN old lockfile '--offline=false',
9:58:56 PM: npm WARN old lockfile '--no-progress',
9:58:56 PM: npm WARN old lockfile '--no-save',
9:58:56 PM: npm WARN old lockfile '--no-audit',
9:58:56 PM: npm WARN old lockfile '--include=dev',
9:58:56 PM: npm WARN old lockfile '--include=peer',
9:58:56 PM: npm WARN old lockfile '--include=optional',
9:58:56 PM: npm WARN old lockfile '--no-package-lock-only',
9:58:56 PM: npm WARN old lockfile '--no-dry-run'
9:58:56 PM: npm WARN old lockfile ],
9:58:56 PM: npm WARN old lockfile code: 1,
9:58:56 PM: npm WARN old lockfile signal: null,
9:58:56 PM: npm WARN old lockfile stdout: '',
9:58:56 PM: npm WARN old lockfile stderr: 'npm WARN using --force Recommended protections disabled.\n' +
9:58:56 PM: npm WARN old lockfile 'npm WARN old lockfile \n' +
9:58:56 PM: npm WARN old lockfile 'npm WARN old lockfile The package-lock.json file was created with an old version of npm,\n' +
9:58:56 PM: npm WARN old lockfile 'npm WARN old lockfile so supplemental metadata must be fetched from the registry.\n' +
9:58:56 PM: npm WARN old lockfile 'npm WARN old lockfile \n' +
9:58:56 PM: npm WARN old lockfile 'npm WARN old lockfile This is a one-time fix-up, please be patient...\n' +
9:58:56 PM: npm WARN old lockfile 'npm WARN old lockfile \n' +
9:58:56 PM: npm WARN old lockfile 'npm ERR! code EINVALIDTAGNAME\n' +
9:58:56 PM: npm WARN old lockfile 'npm ERR! Invalid tag name "^>= 4": Tags may not have any characters that encodeURIComponent encodes.\n' +
9:58:56 PM: npm WARN old lockfile '\n' +
9:58:56 PM: npm WARN old lockfile 'npm ERR! A complete log of this run can be found in:\n' +
9:58:56 PM: npm WARN old lockfile 'npm ERR! /opt/buildhome/.npm/_logs/2021-10-25T20_58_56_298Z-debug.log\n'
9:58:56 PM: npm WARN old lockfile }
9:59:08 PM: npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
9:59:09 PM: npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
9:59:09 PM: npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
9:59:10 PM: npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
9:59:10 PM: npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
9:59:12 PM: npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
9:59:12 PM: npm WARN deprecated querystring#0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
9:59:13 PM: npm WARN deprecated rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
9:59:20 PM: npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
9:59:21 PM: npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
9:59:21 PM: npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
9:59:22 PM: npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
9:59:23 PM: npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
9:59:23 PM: npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
9:59:23 PM: npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
9:59:24 PM: npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
9:59:24 PM: npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
9:59:25 PM: npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
9:59:31 PM: npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
9:59:45 PM: npm ERR! code 1
9:59:45 PM: npm ERR! git dep preparation failed
9:59:45 PM: npm ERR! command /opt/buildhome/.nvm/versions/node/v16.12.0/bin/node /opt/buildhome/.nvm/versions/node/v16.12.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/opt/buildhome/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
9:59:45 PM: npm ERR! npm WARN using --force Recommended protections disabled.
9:59:45 PM: npm ERR! npm WARN old lockfile
9:59:45 PM: npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm,
9:59:45 PM: npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry.
9:59:45 PM: npm ERR! npm WARN old lockfile
9:59:45 PM: npm ERR! npm WARN old lockfile This is a one-time fix-up, please be patient...
9:59:45 PM: npm ERR! npm WARN old lockfile
9:59:45 PM: npm ERR! npm ERR! code EINVALIDTAGNAME
9:59:45 PM: npm ERR! npm ERR! Invalid tag name "^>= 4": Tags may not have any characters that encodeURIComponent encodes.
9:59:45 PM: npm ERR!
9:59:45 PM: npm ERR! npm ERR! A complete log of this run can be found in:
9:59:45 PM: npm ERR! npm ERR! /opt/buildhome/.npm/_logs/2021-10-25T20_59_41_917Z-debug.log
9:59:45 PM: npm ERR! A complete log of this run can be found in:
9:59:45 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-10-25T20_59_45_083Z-debug.log
9:59:45 PM: Error during NPM install
9:59:45 PM: Build was terminated: Build script returned non-zero exit code: 1
9:59:45 PM: Creating deploy upload records
9:59:45 PM: Failing build: Failed to build site
9:59:45 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
9:59:45 PM: Finished processing build request in 1m33.030553565s
I've tried deleting my package-lock.json, I've also tried deleting my node_modules folder and running
npm install
I've also tried putting CI= in my deploy command
Nothing I've tried works. If you could help, that would be greatly appreciated
Nothing has worked
The issue comes from your dependency "hero-slider", which in turn specifies a peer dependency of the package styled-components as follow:
"peerDependencies": {
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"styled-components": "^>= 4"
},
Since you have control over the hero-slider package.json, modify that line and you should be good to go. Edit for clarity: that is, replace it with a specific tag version of the package styled-components, for example "4.3.1".
Alternatively, since your fork of the hero-slider does not seem to add any new feature (besides removing few JS logs), you may link to the hero-slider package from the npm registry. Unless you want to make future commits to your github fork, without publishing it on npm.

Can not deploy gatsby site to Netlify with fontawesome pro

I have a static site built with Gatstbyjs + contentful. When I try to build and deploy it through Netlify, I encounter some weird problems.
After examing my code, I still couldn't find a fix for it. Build works perfectly fine locally, and it seems like the problem only exists when I try to build it through Netlify. I'm guessing this has to do with the FontAwesome Pro plugin needs an access token in order to be accessed through NPM on Netlify? I have the plugin configured with the access token locally on my machine, but not sure how to do it with Netlify. Does this mean I have to remove this plugin altogether?
Here is the error log:
11:21:33 PM: Build ready to start
11:21:36 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
11:21:36 PM: build-image tag: v3.3.2
11:21:36 PM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
11:21:36 PM: Fetching cached dependencies
11:21:36 PM: Starting to download cache of 255.0KB
11:21:36 PM: Finished downloading cache in 86.678513ms
11:21:36 PM: Starting to extract cache
11:21:36 PM: Failed to fetch cache, continuing with build
11:21:36 PM: Starting to prepare the repo for build
11:21:37 PM: No cached dependencies found. Cloning fresh repo
11:21:37 PM: git clone https://github.com/sniperyork/theconcord
11:21:39 PM: Preparing Git Reference refs/heads/master
11:21:39 PM: Starting build script
11:21:39 PM: Installing dependencies
11:21:41 PM: Downloading and installing node v10.16.0...
11:21:41 PM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz...
11:21:41 PM:
#################
11:21:41 PM: 23.9%
11:21:42 PM:
####################################################################
11:21:42 PM: #### 100.0%
11:21:42 PM: Computing checksum with sha256sum
11:21:42 PM: Checksums matched!
11:21:44 PM: Now using node v10.16.0 (npm v6.9.0)
11:21:45 PM: Attempting ruby version 2.6.2, read from environment
11:21:46 PM: Using ruby version 2.6.2
11:21:46 PM: Using PHP version 5.6
11:21:46 PM: Started restoring cached node modules
11:21:46 PM: Finished restoring cached node modules
11:21:47 PM: Installing NPM modules using NPM version 6.9.0
11:21:50 PM: npm
11:21:50 PM: WARN deprecated #babel/polyfill#7.4.4: 🚨 As of Babel 7.4.0, this
11:21:50 PM: npm WARN deprecated package has been deprecated in favor of directly
11:21:50 PM: npm WARN deprecated including core-js/stable (to polyfill ECMAScript
11:21:50 PM: npm WARN deprecated features) and regenerator-runtime/runtime
11:21:50 PM: npm WARN deprecated (needed to use transpiled generator functions):
11:21:50 PM: npm WARN deprecated
11:21:50 PM: npm WARN deprecated > import "core-js/stable";
11:21:50 PM: npm
11:21:50 PM: WARN deprecated > import "regenerator-runtime/runtime";
11:21:56 PM: npm WARN deprecated joi#11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
11:22:00 PM: npm WARN deprecated topo#2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
11:22:00 PM: npm WARN deprecated hoek#4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
11:22:01 PM: npm WARN deprecated core-js#1.2.7: core-js#<2.6.8 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
11:22:08 PM: npm ERR! code E404
11:22:08 PM: npm ERR!
11:22:08 PM: 404 Not Found - GET https://registry.npmjs.org/#fortawesome%2fpro-light-svg-icons - Not found
11:22:08 PM: npm ERR!
11:22:08 PM: 404
11:22:08 PM: npm
11:22:08 PM: ERR! 404 '#fortawesome/pro-light-svg-icons#^5.9.0' is not in the npm registry.
11:22:08 PM: npm ERR!
11:22:08 PM: 404 You should bug the author to publish it (or use the name yourself!)
11:22:08 PM: npm
11:22:08 PM: ERR! 404 It was specified as a dependency of 'repo'
11:22:08 PM: npm ERR!
11:22:08 PM: 404
11:22:08 PM: npm ERR!
11:22:08 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
11:22:08 PM: 404 Note that you can also install from a
11:22:08 PM: npm ERR!
11:22:08 PM: 404 tarball, folder, http url, or git url.
11:22:08 PM: npm
From the docs you should create a .npmrc file in the root of your project (or where you have your package.json file) containing:
#fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=TOKEN
then install the latest version of the pro library using yarn or npm.
Then you import them in app.js as usual and you should be good to go.

App working fine on localhost but doesn't loads on netlify?

i am trying to deploy it now, the app works great on localhost, no problems at all but when i deploy it to netlify from github it crashes by giving me these errors in developers console.
init # include.preload.js:442
(index):1 Mixed Content: The page at 'https://5cfc2538a4fc311e18e72538--brave-poincare-d969b9.netlify.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://video-react.js.org/assets/video-react.css'. This request has been blocked; the content must be served over HTTPS.
2.0370c799.chunk.js:1 Uncaught SyntaxError: Unexpected token <
main.dbd098f2.chunk.js:1 Uncaught SyntaxError: Unexpected token <
include.preload.js:442 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
init # include.preload.js:442
include.preload.js:442 [Deprecation] Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.
init # include.preload.js:442
manifest.json:1 Manifest: Line: 1, column: 1, Unexpected token.
(index):1 Mixed Content: The page at 'https://5cfc2538a4fc311e18e72538--brave-poincare-d969b9.netlify.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://video-react.js.org/assets/video-react.css'. This request has been blocked; the content must be served over HTTPS.
it was not being able to install node-pre-gyp module before, but i fixed it but now it gets deployed but doesn't work
complete log of netlify deployement:
5:14:32 PM: Build ready to start
5:14:34 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
5:14:34 PM: build-image tag: v3.3.2
5:14:34 PM: buildbot version: 75cd99f62ada9e21edea53208e8baf0eab85a045
5:14:35 PM: Fetching cached dependencies
5:14:35 PM: Failed to fetch cache, continuing with build
5:14:35 PM: Starting to prepare the repo for build
5:14:35 PM: No cached dependencies found. Cloning fresh repo
5:14:35 PM: git clone https://github.com/Phyxable/app-jun-07
5:14:50 PM: Preparing Git Reference refs/heads/master
5:14:51 PM: Starting build script
5:14:51 PM: Installing dependencies
5:14:53 PM: Downloading and installing node v10.16.0...
5:14:53 PM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz...
5:14:53 PM:
#######
5:14:53 PM: 11.0%
5:14:53 PM:
###############################################################
5:14:53 PM: ### 91.8%
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: #
5:14:54 PM: ################
5:14:54 PM: ########################################## 100.0%
5:14:54 PM: Computing checksum with sha256sum
5:14:54 PM: Checksums matched!
5:14:56 PM: Now using node v10.16.0 (npm v6.9.0)
5:14:57 PM: Attempting ruby version 2.6.2, read from environment
5:14:58 PM: Using ruby version 2.6.2
5:14:58 PM: Using PHP version 5.6
5:14:58 PM: Started restoring cached node modules
5:15:00 PM: Finished restoring cached node modules
5:15:00 PM: Installing NPM modules using NPM version 6.9.0
5:15:33 PM: > grpc#1.20.3 install /opt/build/repo/node_modules/grpc
5:15:33 PM: > node-pre-gyp install --fallback-to-build --library=static_library
5:15:33 PM: node-pre-gyp
5:15:33 PM: WARN
5:15:33 PM: Using request for node-pre-gyp https download
5:15:34 PM: [grpc] Success: "/opt/build/repo/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" is installed via remote
5:15:34 PM: > core-js-pure#3.1.3 postinstall /opt/build/repo/node_modules/core-js-pure
5:15:34 PM: > node scripts/postinstall || echo "ignore"
5:15:34 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
5:15:34 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
5:15:34 PM: > https://opencollective.com/core-js
5:15:34 PM: > https://www.patreon.com/zloirock
5:15:34 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
5:15:34 PM: > protobufjs#6.8.8 postinstall /opt/build/repo/node_modules/protobufjs
5:15:34 PM: > node scripts/postinstall
5:15:35 PM: > jss#9.8.7 postinstall /opt/build/repo/node_modules/jss
5:15:35 PM: > node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
5:15:35 PM: Love JSS? You can now support us on open collective:
5:15:35 PM: > https://opencollective.com/jss/donate
5:15:35 PM: > firebase-functions#2.3.1 postinstall /opt/build/repo/node_modules/firebase-functions
5:15:35 PM: > node ./upgrade-warning
5:15:35 PM: ======== WARNING! ========
5:15:35 PM: This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.
5:15:35 PM: To see a complete list of these breaking changes, please go to:
5:15:35 PM: https://firebase.google.com/docs/functions/beta-v1-diff
5:15:37 PM: npm WARN
5:15:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/jest-haste-map/node_modules/fsevents):
5:15:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: npm WARN
5:15:37 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/chokidar/node_modules/fsevents):
5:15:37 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: npm
5:15:37 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.6 (node_modules/fsevents):
5:15:37 PM: npm
5:15:37 PM: WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
5:15:37 PM: added 1849 packages from 1018 contributors and audited 890418 packages in 35.912s
5:15:37 PM: found 0 vulnerabilities
5:15:37 PM: NPM modules installed
5:15:37 PM: Started restoring cached go cache
5:15:37 PM: Finished restoring cached go cache
5:15:38 PM: unset GOOS;
5:15:38 PM: unset GOARCH;
5:15:38 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
5:15:38 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
5:15:38 PM: go version >&2;
5:15:38 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
5:15:38 PM: go version go1.12 linux/amd64
5:15:38 PM: Installing missing commands
5:15:38 PM: Verify run directory
5:15:38 PM: Executing user command: npm run build
5:15:38 PM: > finalphyx#0.1.0 build /opt/build/repo
5:15:38 PM: > react-scripts build && echo '/* /index.html 200' > build/_redirects
5:15:39 PM: Creating an optimized production build...
5:16:15 PM: Compiled with warnings.
5:16:15 PM: ./src/Components/App/index.js
5:16:15 PM: Line 13: 'FourZeroFourPage' is defined but never used no-unused-vars
5:16:15 PM: Line 15: 'Switch' is defined but never used no-unused-vars
5:16:15 PM: ./src/Pages/SubscribePage/index.jsx
manifest.json:
{
"short_name": "Phyxable",
"name": "Phyxable",
"icons": [
{
"src": "/images/icon-192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/images/icon-512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"background_color": "#3367D6",
"display": "standalone",
"scope": "/",
"theme_color": "#3367D6"
}
package.json :
{
"name": "finalphyx",
"version": "0.1.0",
"private": true,
"dependencies": {
"#material-ui/lab": "^3.0.0-alpha.30",
"disable-scroll": "^0.4.1",
"firebase": "^6.1.1",
"firebase-functions": "^2.3.1",
"html-loader": "^0.5.5",
"mdbreact": "^4.15.0",
"netlify": "^2.4.6",
"react": "^16.8.6",
"react-bootstrap": "^0.32.4",
"react-div-100vh": "^0.3.4",
"react-dom": "^16.8.6",
"react-firebaseui": "^3.1.2",
"react-ga": "^2.5.7",
"react-jw-player": "^1.19.0",
"react-meta-tags": "^0.7.4",
"react-password-mask": "^3.3.1",
"react-player": "^1.11.0",
"react-responsive": "^7.0.0",
"react-router-dom": "^5.0.1",
"react-scripts": "^3.0.1",
"react-scroll": "^1.7.11",
"react-share": "^3.0.0",
"react-stripe-checkout": "^2.6.3",
"react-stripe-elements": "^3.0.0",
"recompose": "^0.30.0",
"stripe": "^7.1.0",
"video-react": "^0.13.7",
"waypoints": "^4.0.1",
"window-scroll-manager": "^1.1.4"
},
"devDependencies": {
"bundle-loader": "^0.5.6",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build && echo '/* /index.html 200' > build/_redirects",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"deploy": "aws s3 sync build s3://www.phyxable.com"
},
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://jacobmjones#bitbucket.org/jacobmjones/web.git"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"homepage": "https://bitbucket.org/jacobmjones/web#readme",
"author": "",
"license": "ISC",
"description": ""
}
it should be working fine as it works great on localhost but doesn't.
EDIT I was able to resolve this by changing the packages.json file..
From this:
...
"homepage": "https://bitbucket.org/jacobmjones/web#readme",
"author": "",
"license": "ISC",
"description": ""
...
To this:
...
"homepage": "/",
"author": "",
"license": "ISC",
"description": ""
...
This is happening due to mixed content which is preventing your CSS from loading...
Wherever you are importing this CSS within your app: 'http://video-react.js.org/assets/video-react.css'..
..change it to this, and it should work:
'https://video-react.js.org/assets/video-react.css'
Notice the https... You cannot use XHR on a secure (https) connection to retrieve resources on an insecure connection (http).. Your Netlify site is on https and that CSS file is on http - which qualifies for mixed-content.
Chrome
docs
Mozilla/Firefox docs
Error seems to be in 'unexpected token <'
The error Uncaught SyntaxError: Unexpected token < is most commonly caused by your site’s code referring to an asset that is no longer available. Most commonly, this is due to a filename change in assets generated during your build. The same situation happens if you use versioned or chunked javascript where the filename changes with every deploy.
Source: https://community.netlify.com/t/common-issue-why-do-i-see-uncaught-syntaxerror-unexpected-token-errors-how-can-i-use-chunking-or-versioning-for-my-assets-at-netlify/124
In addition, See if you can get any clues from here:
https://www.netlify.com/docs/build-gotchas/
Also, try upgrading node version to the latest one.

Resources