when I want to deploy my project with firebase, I encountered the nodeJS version problem and it troubled me for many days. when I apply the command "firebase deploy --only functions", then it reminds me that:
i deploying functions
Running command: npm --prefix functions install
audited 5522 packages in 8.196s
found 11 vulnerabilities (2 low, 5 moderate, 4 high)
run `npm audit fix` to fix them, or `npm audit` for details
✔ functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error occurred while parsing your function triggers.
Error: The module
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous>
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
Having trouble? Try firebase deploy --help
my node version is v8.11.3 my npm version is 6.2.0
Anyone knows how to solve it?? Thank you very much!!!