Firebase功能找不到模块“周期" [英] Firebase function Cannot find module 'cycle'
问题描述
当我尝试运行任何firebase命令时,出现此错误.
When I try to run any firebase command I get this error.
internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module 'cycle'
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/usr/local/lib/node_modules/firebase- tools/node_modules/winston/lib/winston/common.js:11:13)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
我在
node.js版本v10.5.0
node.js version v10.5.0
npm版本6.1.0
npm version 6.1.0
OS Linux Mint 18.3
OS Linux Mint 18.3
推荐答案
/usr/local/lib/node_modules/firebase-tools/node_modules中的文件未按预期更新和安装.许多模块都不见了.
The files in /usr/local/lib/node_modules/firebase-tools/node_modules are not being updated and installed as expected. Many of the modules are missing.
我已经将Firebase本地安装到要用作Firebase目录的位置.所有模块都在那儿.因此,我将文件从本地node_modules文件夹复制到了全局node_modules文件夹.
I had installed firebase locally into what I am going to use as my firebase directory. All of the modules where there. So I copied the files from the local node_modules folder to the global node_modules folder.
请注意,这是问题的绷带,因为无论何时您要更新Firebase,都需要重复此过程.
To note, this is a bandage to the problem as anytime you go to update firebase you will need to repeat this process.
这篇关于Firebase功能找不到模块“周期"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!