admin 管理员组文章数量: 1086019
I am currently learning React.js from this course on Udemy. I've reached Lecture 27 and I'm at a standstill. I keep getting the error "Firebase is not a constructor." Just from looking at other people's issues, I've figured out that I need to downgrade Firebase down to V. 2. The only question is, how do I go about doing this?
I went to my app.jsx file and changed Firebase down to "^2.4.2". I also reloaded my entire app. I still get the same error, "Firebase is not a constructor".
Can anyone give me any pointers here? I'd really like to get this app to work. What else do I need to change?
I am currently learning React.js from this course on Udemy. I've reached Lecture 27 and I'm at a standstill. I keep getting the error "Firebase is not a constructor." Just from looking at other people's issues, I've figured out that I need to downgrade Firebase down to V. 2. The only question is, how do I go about doing this?
I went to my app.jsx file and changed Firebase down to "^2.4.2". I also reloaded my entire app. I still get the same error, "Firebase is not a constructor".
Can anyone give me any pointers here? I'd really like to get this app to work. What else do I need to change?
Share Improve this question edited May 24, 2016 at 15:44 Leia_Organa asked May 24, 2016 at 15:19 Leia_OrganaLeia_Organa 2,1047 gold badges34 silver badges58 bronze badges 1- Do you use npm to handle your dependencies? – Oscar Commented Jun 20, 2016 at 9:07
4 Answers
Reset to default 2Uninstall the firebase by npm uninstall firebase
then npm install --save [email protected]
or @2.2.7 etc, hope i helped (Y)
Im also starting to learn Firebase. Saw this thread relative to your question. It stated that Firebase team updated their web SDK.
I'm taking the same course and had the same problem. The mand npm install --save firebase
which Stephen (the guy teaching the course) referred to now automatically installs version 3.x of Firebase.
You can just go into the working directory of your project and specify the version of firebase you want to install. He was using v2.3.2 at the time he created the course, so just run the mand npm install --save [email protected]
and that's what fixed it for me. It will overwrite the v3.x you had previously installed in your project.
I was learning from the Udemy video and had the same issue as yours. I changed Firebase down to ^2.4.2
deleted my node_modules
and run npm install
and it worked. Don't forget to delete your node_modules
and npm install
it again.
本文标签:
版权声明:本文标题:javascript - "Firebase is not a constructor" -- need to downgrade Firebase, how to do it? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744012484a2518409.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论