You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Submodule resolution algorithm for module import has changed since Nodejs 13 and our current way of defining submodules using nested package.jsons doesn't work anymore, see nodejs/node#33410
We should use the "exports" field in the root package.json instead:
Feiyang1
changed the title
FR: Support module import in "firebase" package for Nodejs 13/14
FR: Support module import in the "firebase" package for Nodejs 13/14
May 15, 2020
ran into the same issue while coding a little node command line program.
Switched back to require firebase modules.
Didnt even get why a package will try to load a complete different module (firestore-auto-import) which is not even installed:
Error [ERR_UNSUPPORTED_DIR_IMPORT]:
Directory import '/Users/ml/dev/projects/nodejs/firestore-auto-import/node_modules/firebase/auth'
is not supported resolving ES modules imported from
/Users/ml/dev/projects/nodejs/firestore-auto-import/index.js
Did you mean to import firebase/auth/dist/index.cjs.js?
thats what i had before:
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
Update to Node 16 solved issues with ERR_UNSUPPORTED_DIR_IMPORT for me.
Also you may try to add node parameter --experimental-specifier-resolution=node
Submodule resolution algorithm for module import has changed since Nodejs 13 and our current way of defining submodules using nested
package.json
s doesn't work anymore, see nodejs/node#33410We should use the
"exports"
field in the root package.json instead:Note that this only affects importing firebase in Nodejs.
The text was updated successfully, but these errors were encountered: