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
- Immediate function execution seems to be...
Whenever I try to execute a function manually I get an error that the schedule is a required field (even though Now is selected). Not a huge deal, I can obvious...
- Verification failed
I am unable to connect custom domain. it keeps on verifying and when i refresh it says verification failed. I bought my domain from hostinger. my instance is r...
- Creating Function to Submit Email Form f...
I'm trying to create function for Email Form Submit, I fill parameters correctly using my Resend provider, I connect it to my repository, but when I click on De...