通过npm安装firebase时遇到错误|英特尔®开发人员专区解析附近时JSON输入意外结束
问题描述:
我正在尝试在新的React项目中安装Firebase,但无法安装.
I am trying to install firebase in my fresh react project, I could not able to install it.
是错误还是npm需要时间.我正在等待半个多小时.
Whether it is an error or the npm is taking time. I am waiting for more than half an hour.
答
尝试一下(您可能需要运行 sudo
,或者如果您使用的是Windows,则打开 cmd
作为管理员).
Try this (you may need to run sudo
or if you're on Windows, open cmd
as Admin)..
npm cache clean --force
然后运行
npm install firebase