gpt4 book ai didi

rxjs - eslint 错误 : Cannot find any-observable implementation nor global. 可观察到

转载 作者:行者123 更新时间:2023-12-04 11:00:16 28 4
gpt4 key购买 nike

我安装了最新的 "rxjs": "6.2.2","redux-observable": "1.0.0", .

我有进行 eslint 检查的 precommit 钩子(Hook)。

开始安装后抛出此错误:

C:\XXX\node_modules\any-observable\register.js:29
throw new Error('Cannot find any-observable implementation nor' +
^

Error: Cannot find any-observable implementation nor
global.Observable. You must install polyfill or call
require("any-observable/register") with your preferred implementation,
e.g. require("any-observable/register")('rxjs') on application load
prior to any require("any-observable").
at loadImplementation (C:\XXX\node_modules\any-observable\register.js:29:9)
at register (C:\XXX\node_modules\any-observable\loader.js:32:18)
at Object.<anonymous> (C:\XXX\node_modules\any-observable\index.js:2:39)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)

husky > pre-commit hook failed (add --no-verify to bypass)

How can I fix it?
Why eslint is doing stuff with files in `node_modules` anyway?

最佳答案

我有一个类似的问题。我删除了 package-lock.json 和 node-modules 文件夹,运行 npm install一切都解决了。

关于rxjs - eslint 错误 : Cannot find any-observable implementation nor global. 可观察到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51927592/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com