When I run firebase deploy
I get this Node warning:
(node:14802) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
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: []
}
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.
Fixed! The problem was that firebase tools
was stuck on 6.3.1, despite having been updated regularly, with 8.7.0 installed. I ran
curl -sL firebase.tools | upgrade=true bash
and now firebase tools --version
says 8.7.0.
firebase deploy --only hosting
works but to get firebase deploy --only functions
to work I had to go into the functions
folder, open package.json
, and change
"engines": {
"node": "8"
},
to
"engines": {
"node": "10"
},
I have no idea why regularly updating firebase tools
didn't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With