I’m not a newby and have done many build/deploy operations in the past, but I don’t think I’ve encountered this before.
netlify-cli/14.4.0 linux-x64 node-v18.15.0
When running netlify build
from the command line, it reports the following lint warnings:
[eslint]
src/PgnTabs.js
Line 5:10: 'Fragment' is defined but never used no-unused-vars
Line 5:20: 'useRef' is defined but never used no-unused-vars
However, these are wrong: Fragment
is used and useRef
does not appear in the source file (also, the line number is wrong). I’ve done a cat src/PgnTab.js
to confirm this. Apparently, the build is picking up an older version of the source file but I’m not sure where it would be coming from. I’ve tried committing and pushing all changes to the repo, but still the errors.
Completely perplexed. Full build output below.
pgnfen3$ netlify build
Netlify Build
────────────────────────────────────────────────────────────────
❯ Version
@netlify/build 29.20.11
❯ Flags
dry: false
offline: false
❯ Current directory
/home/jlowery2663/pgnfen3
❯ Config file
/home/jlowery2663/pgnfen3/netlify.toml
❯ Context
production
build.command from netlify.toml
────────────────────────────────────────────────────────────────
$ react-scripts build
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
Compiled with warnings.
[eslint]
src/PgnTabs.js
Line 5:10: 'Fragment' is defined but never used no-unused-vars
Line 5:20: 'useRef' is defined but never used no-unused-vars
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
825.17 kB build/static/js/main.9f70de95.js
2.53 kB build/static/css/main.5bce961e.css
1.78 kB build/static/js/787.ffec13a5.chunk.js
The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
yarn global add serve
serve -s build
Find out more about deployment here:
https://cra.link/deployment
(build.command completed in 38.4s)
Functions bundling
────────────────────────────────────────────────────────────────
Packaging Functions from netlify/functions directory:
- pgnfen/pgnfen.js
(Functions bundling completed in 4.6s)
Netlify Build Complete
────────────────────────────────────────────────────────────────
(Netlify Build completed in 43s)