Back

[SOLVED] weird errors on netlify build (vite-react)

  • 0
  • Web
  • Cloud
bonndubz
21 Nov, 2023, 16:45

so im using the npm run build build script, its the one that's in the package.json of my project, and everything builds properly, but its when i get to the page, that i see these error in the console, and react doesnt execute, page wont load.

TL;DR
The user is experiencing weird errors during a Netlify build with Vite-React. The manifest file has been moved to the public folder. The user is unsure about how to serve the site and is looking for guidance on setting the publish directory path. The user is using the `npm run build` script in the project's package.json file. The errors are preventing React from executing and the page from loading. Solution: The user should set the publish directory path in the Netlify deploy settings to point to the `dist/` directory where Vite puts the compiled code.
bonndubz
21 Nov, 2023, 16:45

i dont have my publish directory path set so i assume thats the issue

bonndubz
21 Nov, 2023, 16:45

but i really dont know what path to set for the vite-react project

bonndubz
21 Nov, 2023, 16:45

(vite is what im using to build this project, yes)

bonndubz
21 Nov, 2023, 16:46

package.json file

bonndubz
21 Nov, 2023, 16:47

heres the structure of my project and manifest file is inside the public folder

bonndubz
21 Nov, 2023, 16:47

heres whats inside of public folder

bonndubz
21 Nov, 2023, 17:02

managed some things out, changed the manifest file from public folder to root

bonndubz
21 Nov, 2023, 17:02

but still giving me this error in the index.jsx script

ideclon
21 Nov, 2023, 17:14

How are you serving the site?

bonndubz
21 Nov, 2023, 17:49

wdtm??

bonndubz
21 Nov, 2023, 18:03

serving the site?

bonndubz
21 Nov, 2023, 18:03

uhh it gets the files from a github project i push my files into

bonndubz
21 Nov, 2023, 18:04

then netlify just builds the app from there

bonndubz
21 Nov, 2023, 18:04

these are my deploy settings

ideclon
21 Nov, 2023, 19:30

I’ve never used Netlify, but it looks like you might be serving the root directory of your project instead of dist/?

bonndubz
21 Nov, 2023, 21:01

hmmmm

bonndubz
21 Nov, 2023, 21:01

dist?

ideclon
21 Nov, 2023, 21:21

Vite puts the compiled code in dist/

bonndubz
21 Nov, 2023, 21:43

ooo alr alr

bonndubz
21 Nov, 2023, 21:43

tysm

ideclon
22 Nov, 2023, 03:04

If your issue has been solved, you can close this post by adding “[SOLVED]” to the beginning of the title

bonndubz
22 Nov, 2023, 10:40

yessir ty

bonndubz
22 Nov, 2023, 10:40

[SOLVED] weird errors on netlify build (vite-react)

bonndubz
22 Nov, 2023, 10:41

also, just for the note, manifest went back into the public folder

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more