我正在使用Firebase CLI来测试我的云Firestore安全规则,并且在使用npm install @firebase/testing --save-dev
-
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
> core-js@3.6.5 postinstall E:\Coding\Web\poll-app firebase test\test\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
internal/modules/cjs/loader.js:967
throw err;
^
Error: Cannot find module 'E:\Coding\Web\poll-app firebase test\test\node_modules\core-js\-e'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:964:15)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1346:46)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN test@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js@3.6.5 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the core-js@3.6.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
有人可以告诉我我应该怎么做吗?
答案 0 :(得分:0)
因此,我可以通过以下操作对其进行修复。我去了Firebase控制台,并从“安全规则”游乐场选项中打开了一个云外壳。加载后,我将按照右侧面板上显示的学习助手给出的步骤进行操作,并通过从GitHub克隆教程来设置我的云外壳。然后,我转到quickstart-testing / cs-walkthrough / functions并下载了node_modules文件夹。它已作为tar文件下载。我以管理员权限运行WinRAR,并提取了tar文件。而且有效。我真的不明白它是如何工作的以及为什么起作用,但这就是我为解决问题所做的。