Hi all, hoping to resolve this issue and help anyone else having the same.
I’ve got a vue/vite site. im trying to use serverless functions and i need axios. i thought a simple require would work, and it does locally but in prod this is the error,
so my question is this, how do i import axios and use in functions? im assuming the build process on node for functions isn’t installing axios as a dependency for some reason. Do i need to add external deps as a plugin for the netlify build process somewhere? i appreciate all the help. The guides are helpful and i think this issue is perhaps build specific. thank you in advance.
[build]
functions = "functions"
[[redirects]]
from = "/api/*"
to = "/.netlify/functions/:splat"
status = 200
[[redirects]]
from = "/*"
to = "index.html"
status = 200