Hi everyone!
I try first time to deploy my react site here. I am not sure what I am doing wrong. Should I change something in settings?
6:01:29 PM: Netlify Build
6:01:29 PM: ────────────────────────────────────────────────────────────────
6:01:29 PM:
6:01:29 PM: ❯ Version
6:01:29 PM: @netlify/build 29.20.6
6:01:29 PM:
6:01:29 PM: ❯ Flags
6:01:29 PM: baseRelDir: true
6:01:29 PM: buildId: 64e77eaaf55b41262c93d8dc
6:01:29 PM: deployId: 64e77eaaf55b41262c93d8de
6:01:29 PM:
6:01:29 PM: ❯ Current directory
6:01:29 PM: /opt/build/repo/frontend
6:01:29 PM:
6:01:29 PM: ❯ Config file
6:01:29 PM: No config file was defined: using default values.
6:01:29 PM:
6:01:29 PM: ❯ Context
6:01:29 PM: production
6:01:30 PM:
6:01:30 PM: Build command from Netlify app
6:01:30 PM: ────────────────────────────────────────────────────────────────
6:01:30 PM:
6:01:30 PM: $ npm run build
6:01:30 PM: > books@0.1.0 build
6:01:30 PM: > react-scripts build
6:01:31 PM: Creating an optimized production build...
6:01:38 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
6:01:35 PM: One of your dependencies, babel-preset-react-app, is importing the
6:01:35 PM: @babel/plugin-proposal-private-property-in-object package without
6:01:35 PM: declaring it in its dependencies. This is currently working because
6:01:35 PM: @babel/plugin-proposal-private-property-in-object is already in your
6:01:35 PM: node_modules folder for unrelated reasons, but it may break at any time.
6:01:35 PM: babel-preset-react-app is part of the create-react-app project, which
6:01:35 PM: is not maintianed anymore. It is thus unlikely that this bug will
6:01:35 PM: ever be fixed. Add @babel/plugin-proposal-private-property-in-object to
6:01:35 PM: your devDependencies to work around this error. This will make this message
6:01:35 PM: go away.
6:01:37 PM:
6:01:37 PM: Treating warnings as errors because process.env.CI = true.
6:01:37 PM: Most CI servers set it automatically.
6:01:37 PM:
6:01:37 PM: Failed to compile.
6:01:37 PM:
6:01:37 PM: [eslint]
6:01:37 PM: src/App.js
6:01:37 PM: Line 1:33: 'useState' is defined but never used no-unused-vars
6:01:37 PM: Line 11:6: React Hook useEffect has a missing dependency: 'fetchBooks'. Either include it or remove the dependency array react-hooks/exhaustive-deps
6:01:37 PM: src/BookCreate.js
6:01:37 PM: Line 33:20: Expected '===' and instead saw '==' eqeqeq
6:01:37 PM: Line 33:35: Expected '===' and instead saw '==' eqeqeq
6:01:37 PM: Line 33:50: Expected '===' and instead saw '==' eqeqeq
6:01:37 PM: Line 33:65: Expected '===' and instead saw '==' eqeqeq
6:01:37 PM: Line 49:19: Expected '===' and instead saw '==' eqeqeq
6:01:37 PM: Line 101:40: Expected '!==' and instead saw '!=' eqeqeq
6:01:37 PM: src/context/books.js
6:01:37 PM: Line 15:9: The 'createBook' function makes the dependencies of useEffect Hook (at line 68) change on every render. To fix this, wrap the definition of 'createBook' in its own useCallback() Hook react-hooks/exhaustive-deps
6:01:37 PM: Line 35:9: The 'deleteBookById' function makes the dependencies of useEffect Hook (at line 72) change on every render. To fix this, wrap the definition of 'deleteBookById' in its own useCallback() Hook react-hooks/exhaustive-deps
6:01:37 PM: Line 39:22: Expected '!==' and instead saw '!=' eqeqeq
6:01:37 PM: Line 45:9: The 'editBookById' function makes the dependencies of useEffect Hook (at line 76) change on every render. To fix this, wrap the definition of 'editBookById' in its own useCallback() Hook react-hooks/exhaustive-deps
6:01:37 PM: Line 56:19: Expected '===' and instead saw '==' eqeqeq
6:01:37 PM:
6:01:37 PM: build.command failed
6:01:37 PM: ────────────────────────────────────────────────────────────────
6:01:37 PM:
6:01:37 PM: Error message
6:01:37 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
6:01:37 PM:
6:01:37 PM: Error location
6:01:37 PM: In Build command from Netlify app:
6:01:37 PM: npm run build
6:01:37 PM:
6:01:37 PM: Resolved config
6:01:37 PM: build:
6:01:37 PM: base: /opt/build/repo/frontend
6:01:37 PM: command: npm run build
6:01:37 PM: commandOrigin: ui
6:01:37 PM: publish: /opt/build/repo/frontend
6:01:37 PM: publishOrigin: default
6:01:38 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:01:38 PM: Failing build: Failed to build site
6:01:39 PM: Finished processing build request in 28.35s
Name of website:
fascinating-eclair-8b9d92
Thank you in advance!