Our server application needs to utilize the most recent ipfs-http-client as it is an authorized package for accessing IPFS. However, the project must switch to using ESM starting from v57.0.0. I have invested a significant amount of time into this and it has been quite frustrating... some assistance would be greatly appreciated.
I have consulted the following resources:
- https://firebase.google.com/docs/functions/get-started?gen=1st
- https://github.com/ipfs/js-ipfs/blob/master/docs/upgrading/v0.62-v0.63.md#esm
- https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
- https://www.typescriptlang.org/docs/handbook/esm-node.html
- as well as numerous other documentation and Stack Overflow threads
Unfortunately, when running Firebase locally, I encountered the following error:
⬢ functions: Failed to load function definition from source: FirebaseError: Failed to load function definition from source: Failed to generate manifest from function source: TypeError: admin.initializeApp is not a function
This issue is preventing me from testing, deploying, and moving forward with the project.
To identify the root cause of the problem, I created a new minimalistic project from scratch, outlined below:
package.json
{
"name": "functions",
// rest of the JSON content...
}