Hello guys, i just installed a javascript libary to my cloud function project and now i'm getting this error
can you show me your package.json file
here is the package.json
remove this "type": "module" from your package.json and try again
okay
also can you show the main.js file
now, i'm getting this
here is the main.js
use import axios from 'axios'; for importing axios, and add "type": "module" back to package.json
require() is only available in CommonJS, but import can only be used in ES Modules
so how do i use the import with axios
If your issue has been solved, you can mark this post as closed by adding "[SOLVED]" to the beginning of the title
Recommended threads
- Hi, I'm getting this error while deployi...
✗ Error • search (6937cb70002c2e9c1a97) • Fai ✗ Error: Deployment of search has failed. Check at https://cloud.appwrite.io/console/project-693...
- Timed out waiting for runtime. Error Cod...
After setting up my ML project that uses deepface and tensorflow in appwrite functions I get the `Timed out waiting for runtime. Error Code: 400. ` error. I am...
- Bug: Cloud Function On Schedule Didn't R...
Heya I have a cloud function with this cron `0 17 * * *` to run at 9AM PT every day. I have not touched this since I set it up, and it has been working fine s...