Can't install firebase-admin with npm

给你一囗甜甜゛ 提交于 2020-01-07 08:29:53

问题


I'm trying to run this command to install firebase-admin: npm install firebase-admin --save

When I try to run this command, I get the following error:

ENOENT: no such file or directory, rename 'D:\MyPath\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\abbrev' -> 'D:\MyPath\functions\node_modules\firebase-admin\node_modules\grpc\node_modules\.abbrev.DELETE'

I have tried reinstalling Node.js, I have tried uninstalling a previous version of Node.js, I have tried updating npm, I have tried pretty much everything online but nothing is helping. If I run the newest version of Node.js, instead of getting this error, I get the following error:

Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1

I have honestly tried several GitHub threads for people with the same problem but none of their solutions have worked for me, so I am trying here. Can anybody help me with this issue?


回答1:


Upon further tinkering with this, it looks like I finally solved my issue so i can finally deploy to Firebase. These are the steps I took to solve this problem:

  1. First, I uninstalled firebase-admin using the npm uninstall firebase-admin command.
  2. I reinstalled firebase-adming using the npm install firebase-admin command. This didn't seem to fix my issue, but you never know.
  3. I deleted the firebase-admin directory in the node_modules directory.
  4. I ran npm install
  5. I installed the firebase-admin directory again, this time using npm install firebase-admin --save
  6. I ran firebase deploy and it worked!

I don't know how many of those steps were truly necessary but in the end, it worked.



来源:https://stackoverflow.com/questions/47932525/cant-install-firebase-admin-with-npm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!