I'm relatively unfamiliar with deployment, Next.js and also Vercel. I am currently experiencing two fatal errors when building.
[22:35:25.855] Running build in Cleveland, USA (East) – cle1
[22:35:25.912] Cloning github.com/REDACTED/website (Branch: main, Commit: e8b813a)
[22:35:45.575] Cloning completed: 19.663s
[22:35:45.688] Skipping build cache since Package Manager changed from "yarn" to "npm"
[22:35:45.709] Running "vercel build"
[22:35:46.152] Vercel CLI 28.17.0
[22:35:46.709] Running "install" command: `npm install`...
[22:35:53.514]
[22:35:53.515] added 299 packages, and audited 300 packages in 7s
[22:35:53.515]
[22:35:53.515] 109 packages are looking for funding
[22:35:53.515] run `npm fund` for details
[22:35:53.516]
[22:35:53.516] found 0 vulnerabilities
[22:35:53.832]
[22:35:53.832] > [email protected] build
[22:35:53.832] > next build
[22:35:53.832]
[22:35:54.242] warn - You have enabled experimental feature (scrollRestoration) in next.config.js.
[22:35:54.243] warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
[22:35:54.243]
[22:35:54.268] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[22:35:54.268] This information is used to shape Next.js' roadmap and prioritize features.
[22:35:54.268] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[22:35:54.268] https://nextjs.org/telemetry
[22:35:54.268]
[22:35:54.403] info - Linting and checking validity of types...
[22:35:56.309]
[22:35:56.310] Failed to compile.
[22:35:56.310]
[22:35:56.310] ./src/components/Footer.jsx
[22:35:56.310] 12:11 Warning: Do not use `<img>` element. Use `<Image />` from `next/image` instead. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
[22:35:56.310] 24:13 Warning: Do not use `<img>` element. Use `<Image />` from `next/image` instead. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
[22:35:56.310]
[22:35:56.310] ./src/components/Header.jsx
[22:35:56.310] 99:13 Warning: Do not use `<img>` element. Use `<Image />` from `next/image` instead. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
[22:35:56.310]
[22:35:56.310] ./src/components/Pricing.jsx
[22:35:56.311] 90:12 Error: `'` can be escaped with `'`, `‘`, `'`, `’`. react/no-unescaped-entities
[22:35:56.311]
[22:35:56.311] info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[22:35:56.336] Error: Command "npm run build" exited with 1
[22:35:56.717] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1
The two fatal errors of course being:
[22:35:56.336] Error: Command "npm run build" exited with 1 [22:35:56.717] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1, and:
[22:35:56.310] Failed to compile.
Really hoping for some help on this one as I'm completely stumped.
I've attempted reinstalling the node_modules several times, deploying several times and many other things..
I've attempted to switch the Build Command to CI='' npm run build and that changed nothing but the syntax in the error.
run npm run lint and see where the error is coming from. You should fix the warnings too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With