firebase deploy Node "Warning: Accessing non-existent property"

Tho*_*hoe 2 node.js firebase firebase-cli

When I run firebase deploy I get this Node warning:

(node:14802) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
Run Code Online (Sandbox Code Playgroud)

I tried firebase deploy --only hosting and firebase deploy --only functions and got the same error message, so it's not my code.

I ran node --trace-warnings ... and got:

internal/modules/cjs/loader.js:1083
  throw err;
  ^

Error: Cannot find module '/Users'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1080:15)
    at Function.Module._load (internal/modules/cjs/loader.js:923:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Run Code Online (Sandbox Code Playgroud)

That seems to say that the problem isn't in my code.

I tried Node v14.8.0 (the latest), v14.1.0, and v12.8.5.

Running firebase tools --version I get 6.3.1. The latest version is 8.7.0. I update all my npm packages at least one a week using npm-check. I ran npm i firebase-tools and its says that it installed 8.7.0 but when I run firebase tools --version I still see 6.3.1. I also ran npm install -g firebase-tools, again it stays on 6.3.1. How do I switch from 6.3.1 to 8.7.0?

package.json and package-lock.json say 8.7.0.

Tho*_*hoe 6

固定的!问题是它firebase tools卡在 6.3.1 上,尽管已经定期更新,安装了 8.7.0。我跑了

curl -sL firebase.tools | upgrade=true bash
Run Code Online (Sandbox Code Playgroud)

现在firebase tools --version说 8.7.0。

firebase deploy --only hosting工作,但要开始firebase deploy --only functions工作,我必须进入functions文件夹,打开package.json并更改

"engines": {
    "node": "8"
  },
Run Code Online (Sandbox Code Playgroud)

"engines": {
    "node": "10"
  },
Run Code Online (Sandbox Code Playgroud)

我不知道为什么定期更新firebase tools不起作用。