
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
- Functions page just got frozen when I tr...
Does someone know why this happens? would really appreaciate any help
- Github push not triggering function depl...
I'm using appwrite cloud instance and connected my github account to appwrite successfully. I also configured the git settings of my appwrite functions. however...
- Python Flask Project Deploy
I am trying to deploy a Python Project works with Flask on Appwrite, but this is not working, domain shows 500 Error and Logs for any execution is not loading ...
