When I do:
npm run build
directly in bash it completes successfully, but when I do netlify build it errors out, what am doing wrong?
Build log:
┌─────────────────────────────┐
│ Netlify Build │
└─────────────────────────────┘
❯ Version
@netlify/build 5.2.1
❯ Flags
mode: cli
❯ Current directory
/home/chakradarraju/workspace/stringsai/node/admin/frontend
❯ Config file
No config file was defined: using default values.
❯ Context
production
┌───────────────────────────────────┐
│ 1. Build command from Netlify app │
└───────────────────────────────────┘
$ npm run build
> admin@0.1.0 build /home/chakradarraju/workspace/stringsai/node/admin/frontend
> react-scripts build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.
Failed to compile.
./src/DefaultTrackers.js
Line 106: Expected to return a value in arrow function array-callback-return
./src/CustomersTable.jsx
Line 11: Expected '===' and instead saw '==' eqeqeq
./src/App.jsx
Line 12: 'NewCustomer' is defined but never used no-unused-vars
Line 16: 'PersonAddIcon' is defined but never used no-unused-vars
./src/Home.jsx
Line 17: Duplicate key 'color' no-dupe-keys
./src/CallTranscript.jsx
Line 181: Do not mutate state directly. Use setState() react/no-direct-mutation-state
Line 182: Do not mutate state directly. Use setState() react/no-direct-mutation-state
Line 209: Do not mutate state directly. Use setState() react/no-direct-mutation-state
Line 210: Do not mutate state directly. Use setState() react/no-direct-mutation-state
Line 312: 'ss' is assigned a value but never used no-unused-vars
./src/Debug.jsx
Line 1: 'ListItemText' is defined but never used no-unused-vars
Line 1: 'Input' is defined but never used no-unused-vars
Line 1: 'Button' is defined but never used no-unused-vars
Line 1: 'IconButton' is defined but never used no-unused-vars
Line 36: React Hook useEffect has a missing dependency: 'debugPages'. Either include it or remove the dependency array react-hooks/exhaustive-deps
./src/DebugImages.jsx
Line 23: React Hook useEffect has a missing dependency: 'getImages'. Either include it or remove the dependency array react-hooks/exhaustive-deps
Line 80: Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blank
Line 94: Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blank
Line 103: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
Line 131: The 'handleKeyDown' function makes the dependencies of useEffect Hook (at line 129) change on every render. Move it inside the useEffect callback. Alternatively, wrap the 'handleKeyDown' definition into its own useCallback() Hook react-hooks/exhaustive-deps
./src/FixDiarization.jsx
Line 28: React Hook useEffect has missing dependencies: 'backendUrl' and 'headers'. Either include them or remove the dependency array react-hooks/exhaustive-deps
Line 82: React Hook useEffect has missing dependencies: 'channel', 'engineIdStringsIdEntry', and 'setChanged'. Either include them or remove the dependency array. If 'setChanged' changes too often, find the parent component that defines it and wrap that definition in useCallback react-hooks/exhaustive-deps
Line 87: React Hook useEffect has missing dependencies: 'channel', 'engineIdStringsIdEntry', and 'setChanged'. Either include them or remove the dependency array. If 'setChanged' changes too often, find the parent component that defines it and wrap that definition in useCallback react-hooks/exhaustive-deps
Line 91: React Hook useEffect has missing dependencies: 'engineIdStringsIdEntry' and 'setChanged'. Either include them or remove the dependency array. If 'setChanged' changes too often, find the parent component that defines it and wrap that definition in useCallback react-hooks/exhaustive-deps
./src/CallData.jsx
Line 2: 'Button' is defined but never used no-unused-vars
Line 31: React Hook useEffect has missing dependencies: 'backendUrl' and 'headers'. Either include them or remove the dependency array react-hooks/exhaustive-deps
./src/CallStatuses.jsx
Line 2: 'Select' is defined but never used no-unused-vars
Line 21: 'setColumnsHidden' is assigned a value but never used no-unused-vars
Line 74: Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blank
./src/Customer.jsx
Line 3: 'FormLabel' is defined but never used no-unused-vars
Line 247: React Hook useEffect has missing dependencies: 'fetchCustomerData', 'keyPhrases', and 'props.match'. Either include them or remove the dependency array react-hooks/exhaustive-deps
./src/ModelAssignments.jsx
Line 4: 'Input' is defined but never used no-unused-vars
Line 4: 'DialogContentText' is defined but never used no-unused-vars
Line 4: 'CircularProgress' is defined but never used no-unused-vars
./src/IntegrationMetaData.jsx
Line 53: Expected to return a value in arrow function array-callback-return
Line 59: Expected to return a value in arrow function array-callback-return
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! admin@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the admin@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/chakradarraju/.npm/_logs/2020-11-10T12_18_21_777Z-debug.log
┌─────────────────────────────┐
│ "build.command" failed │
└─────────────────────────────┘
Error message
Command failed with exit code 1: npm run build
Error location
In Build command from Netlify app:
npm run build
Resolved config
build:
base: /home/chakradarraju/workspace/stringsai/node/admin/frontend
command: npm run build
commandOrigin: ui
environment:
- CI
publish: /home/chakradarraju/workspace/stringsai/node/admin/frontend/build