Today I installed firebase-admin package and followed the document:
import { initializeApp } from 'firebase-admin/app';
but I got the error:
Unable to resolve some modules:
"firebase-admin/app"
...
If you notice problems related to these missing modules, consider running:
meteor npm install --save firebase-admin
The inside of firebase-admin/package.json has this exports block:
Ran into the same situation today with 1. unist-util-visit-parents. Uses a different export if it’s node. Meteor complains the module doesn’t exist.
Anyone know of a fix? I haven’t upgraded this project to 3.0 yet, but not sure if that’s resolved in 3.0?
AFAIK the problem is on line 31 "type": "module"
Your Meteor package.json is probably set to “commonjs” so you cannot import ESM modules.
Also discussed here: ESM packages support · Issue #11631 · meteor/meteor · GitHub
I don’t know what is the situation in Meteor 3.
It seems that I cannot tag anyone in this thread but I thing the Meteor Team would know the status of ESMs in Meteor 3.
The original problem withe Firebase I think was related to a wrong import. That library is server side only and perhaps that user was trying to import it on the client (browser). That is the central tech library inside the Push package I use.