Vite deployment via git keeps failing build step, ...
# pages-help
k
I tried multiple node versions, multiple framework presets, etc. Vite itself doesn't seem to be a framework preset option so I tried react and vue and none. I tried adding things to the build command. I followed the steps from the docs here https://developers.cloudflare.com/pages/framework-guides/deploy-a-vite3-project/ and here https://vitejs.dev/guide/static-deploy.html#cloudflare-pages Nothing I do seems to get it to have vite available during the build step. Am I missing something simple?
c
Do you have a
package.json
file in your repo that has vite listed in it
k
yes, vite is listed as a dev dependency
ohhhh ok that explains it, I had an environment variable of
NODE_ENV
as
production
so it wasn't installing dev dependencies. Your question made me realize that 😂
how do I mark this as solved?
c
I don’t think we mark as solved.
e
Right click, edit tags, solved

https://cdn.discordapp.com/attachments/1106356347953492008/1106367882864099348/image.pngâ–¾

You can also do "Close post" if you want as well
7 Views