2:43:59 PM: Netlify Build
2:43:59 PM: ────────────────────────────────────────────────────────────────
2:43:59 PM:
2:43:59 PM: ❯ Version
2:43:59 PM: @netlify/build 29.21.1
2:43:59 PM:
2:43:59 PM: ❯ Flags
2:43:59 PM: baseRelDir: true
2:43:59 PM: buildId: 652272beada01b16c6383440
2:43:59 PM: deployId: 652272beada01b16c6383442
2:43:59 PM:
2:43:59 PM: ❯ Current directory
2:43:59 PM: /opt/build/repo
2:43:59 PM:
2:43:59 PM: ❯ Config file
2:43:59 PM: No config file was defined: using default values.
2:43:59 PM:
2:43:59 PM: ❯ Context
2:43:59 PM: production
2:43:59 PM:
2:43:59 PM: Build command from Netlify app
2:43:59 PM: ────────────────────────────────────────────────────────────────
2:43:59 PM:
2:43:59 PM: $ npm run build
2:44:00 PM: > maltimart-ecommerce@0.1.0 build
2:44:00 PM: > react-scripts build
2:44:01 PM: Creating an optimized production build…
2:44:04 PM: One of your dependencies, babel-preset-react-app, is importing the
2:44:04 PM: “@babel/plugin-proposal-private-property-in-object” package without
2:44:04 PM: declaring it in its dependencies. This is currently working because
2:44:04 PM: “@babel/plugin-proposal-private-property-in-object” is already in your
2:44:04 PM: node_modules folder for unrelated reasons, but it may break at any time.
2:44:04 PM: babel-preset-react-app is part of the create-react-app project, which
2:44:04 PM: is not maintianed anymore. It is thus unlikely that this bug will
2:44:04 PM: ever be fixed. Add “@babel/plugin-proposal-private-property-in-object” to
2:44:04 PM: your devDependencies to work around this error. This will make this message
2:44:04 PM: go away.
2:44:26 PM:
2:44:26 PM: Treating warnings as errors because process.env.CI = true.
2:44:26 PM: Most CI servers set it automatically.
2:44:26 PM:
2:44:26 PM: Failed to compile.
2:44:26 PM:
2:44:26 PM: [eslint]
2:44:26 PM: src/components/Footer/Footer.jsx
2:44:26 PM: Line 103:15: Using target=“_blank” without rel=“noreferrer” (which implies rel=“noopener”) is a security risk in older browsers: see About rel=noopener react/jsx-no-target-blank
2:44:26 PM: src/components/Header/Header.jsx
2:44:26 PM: Line 1:17: “useState” is defined but never used no-unused-vars
2:44:26 PM: src/pages/Login.jsx
2:44:26 PM: Line 26:13: “user” is assigned a value but never used no-unused-vars
2:44:26 PM: src/pages/ProductDetails.jsx
2:44:26 PM: Line 42:11: “reviewObj” is assigned a value but never used no-unused-vars
2:44:26 PM: src/pages/SignUp.jsx
2:44:26 PM: Line 4:16: “Navigate” is defined but never used no-unused-vars
2:44:26 PM: Line 13:10: “upload” is defined but never used no-unused-vars
2:44:26 PM: Line 14:10: “async” is defined but never used no-unused-vars
2:44:26 PM:
2:44:26 PM: “build.command” failed
2:44:26 PM: ────────────────────────────────────────────────────────────────
2:44:26 PM:
2:44:26 PM: Error message
2:44:26 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
2:44:26 PM:
2:44:26 PM: Error location
2:44:26 PM: In Build command from Netlify app:
2:44:26 PM: npm run build
2:44:26 PM:
2:44:26 PM: Resolved config
2:44:26 PM: build:
2:44:26 PM: command: npm run build
2:44:26 PM: commandOrigin: ui
2:44:26 PM: publish: /opt/build/repo/build
2:44:26 PM: publishOrigin: ui
2:44:27 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:44:27 PM: Failing build: Failed to build site
2:44:28 PM: Finished processing build request in 52.281s
2:44:27 PM: Failed during stage “building site”: Build script returned non-zero exit code: 2
Change your build command to CI= npm run build
.