Deploying serverless function on netlify and have been struggling to get sanity-algolia to work. Have tried adapting example on here as well as on the algolia tutorial.
Current error:
ERROR Invoke Error {"errorType":"TypeError","errorMessage":"(0 , import_sanity_algolia.default) is not a function","stack":["TypeError: (0 , import_sanity_algolia.default) is not a function"," at Runtime.handler (/var/task/frontend/netlify/functions/algolia-sync.js:12868:59)"," at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1028:29)"]}
Unsure exactly why this error is occuring as sanity webhook is sending the correct data through. I previously had a GROQ projection but removed to keep the code simpler and isolate the error, just trying to change the title of the document a the moment so I know its working correctly.
Deploying serverless function on netlify and have been struggling to get sanity-algolia to work. Have tried adapting example on here as well as on the algolia tutorial.
Current error:
ERROR Invoke Error {"errorType":"TypeError","errorMessage":"(0 , import_sanity_algolia.default) is not a function","stack":["TypeError: (0 , import_sanity_algolia.default) is not a function"," at Runtime.handler (/var/task/frontend/netlify/functions/algolia-sync.js:12868:59)"," at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1028:29)"]}
And the code that I am running
Unsure exactly why this error is occuring as sanity webhook is sending the correct data through. I previously had a GROQ projection but removed to keep the code simpler and isolate the error, just trying to change the title of the document a the moment so I know its working correctly.