无法读取未定义的属性(读取“路径”)Firebase ref 函数冲突

Has*_*aza 5 javascript firebase firebase-realtime-database firebase-storage

错误:

未捕获(承诺中)类型错误:无法读取未定义的属性(读取“路径”)

根据我的测试,

   import { getStorage, ref, uploadBytesResumable, getDownloadURL } 
    from "https://www.gstatic.com/firebasejs/9.1.1/firebase-storage.js";
    
    import { getDatabase, set, child, get, update, remove } 
    from "https://www.gstatic.com/firebasejs/9.1.1/firebase-database.js";
    
    const realdb = getDatabase();
Run Code Online (Sandbox Code Playgroud)

该错误是因为firebase-storage中的ref( )函数与firebase-database中的ref( )不同

但我只能导入其中一个函数,那么该怎么办呢?要保存 downloadURL,我需要 (firebase-storage) 和 (firebase-database)。