Firebase-在Windows中的Firebase CLI中安装时出错

Firebase-在Windows中的Firebase CLI中安装时出错,firebase,firebase-cli,Firebase,Firebase Cli,我正在尝试在windows 10中设置firebase命令行界面(CLI),我使用以下命令安装firebase工具 npm install -g firebase-tools 但是我的安装失败了 npm ERR! Unexpected end of JSON input while parsing near '..."./bin/express"},"dir' npm ERR! A complete log of this run can be found in: npm ERR!

我正在尝试在windows 10中设置firebase命令行界面(CLI),我使用以下命令安装firebase工具

npm install -g firebase-tools
但是我的安装失败了

npm ERR! Unexpected end of JSON input while parsing near '..."./bin/express"},"dir'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\raj kumar\AppData\Roaming\npm-cache\_logs\2019-05-11T04_40_26_201Z-debug.log
日志说

148 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '..."./bin/express"},"dir'
148 verbose stack     at JSON.parse (<anonymous>)
148 verbose stack     at parseJson (C:\snapshot\firepit\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
148 verbose stack     at Body.json.consumeBody.call.then.buffer (C:\snapshot\firepit\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
148 verbose stack     at process._tickCallback (internal/process/next_tick.js:68:7)
149 verbose cwd C:\Users\raj kumar\Downloads
150 verbose Windows_NT 10.0.16299
151 verbose argv "C:\\Users\\RAJKUM~1\\DOWNLO~1\\firebase-cli.exe" "C:\\snapshot\\firepit\\node_modules\\npm\\bin\\npm-cli" "--script-shell=C:\\Users\\RAJKUM~1\\CACHE~1\\firebase\\bin/shell.bat" "--globalconfig=C:\\Users\\RAJKUM~1\\CACHE~1\\firebase\\bin\\npmrc" "install" "-g" "--verbose" "npm" "firebase-tools"
152 verbose node v10.4.1
153 verbose npm  v6.1.0
154 error Unexpected end of JSON input while parsing near '..."./bin/express"},"dir'
155 verbose exit [ 1, true ]
148详细堆栈语法错误:在“…”/bin/express”},“dir”附近解析时JSON输入意外结束
148 JSON.parse()处的详细堆栈
148 parseJson处的详细堆栈(C:\snapshot\firbit\node\u modules\npm\node\u modules\json parse better errors\index.js:7:17)
148 Body.json.consumerbody.call.then.buffer处的详细堆栈(C:\snapshot\firbit\node\u modules\npm\node\u modules\pacote\node\u modules\make fetch-ocate\node\u modules\node fetch npm\src\Body.js:96:50)
148进程处的详细堆栈。_tickCallback(internal/process/next_tick.js:68:7)
149详细cwd C:\Users\raj kumar\Downloads
150详细窗口\u NT 10.0.16299
151详细argv“C:\\Users\\RAJKUM~1\\DOWNLO~1\\firebase cli.exe”“C:\\snapshot\\firefit\\node\u modules\\npm\\bin\\npm cli”“--脚本shell=C:\\Users\\RAJKUM~1\\CACHE~1\\firebase\\bin/shell.bat”“--globalconfig=C:\\Users\\RAJKUM~1\\CACHE~1\\firebase\\bin\\npmrc”“install”“-g”“--verbose”“npm”“firebase tools”
152详细节点v10.4.1
153详细的npm v6.1.0
154在“…”/bin/express“},“dir”附近解析时,JSON输入意外结束时出错
155详细退出[1,true]

有人能帮我解决这个问题吗?

Node和NPM有更新的版本。尝试更新它们,这可能会解决问题

然后跑

npm cache clean --force

已更新当前版本,但错误仍然存在。