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"
]
}
}