Closed kkgthb closed 3 years ago
Hello @kkgthb . If you are using require
you might need to get the default export. A better way is to use babel
or some other bundler/transpiler when you deploy javascript code.
Try
const sanityAlgolia = require("sanity-algolia").default';
I'm trying to use Netlify with your example function instead of Vercel. I'm getting errors about
@import
and saw a tip to switch torequire
imports instead.However, I keep getting failures like
TypeError: sanityAlgolia.webhookSync is not a function
orTypeError: indexer is not a function
.Any tips?