Realm React-native无法找到模块“ fs-extra”

时间:2019-10-28 22:30:52

标签: android ios reactjs react-native realm

在iOS模拟器上运行时出现此错误。我尝试了许多解决方案,但没有任何效果。

Error: Cannot find module 'fs-extra'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/realm/scripts/download-realm.js:21:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Command /bin/sh failed with exit code 1


** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Download\ Core /MyProject/ios/build/MyProject/Build/Intermediates.noindex/RealmJS.build/Debug-iphonesimulator/RealmJS.build/Script-F63FF2C51C12462600B3B8E0.sh

即使我试图在空的新项目上运行Realm,但问题仍然存在。

如果有人遇到此问题,那就太好了。

更多信息

Realm JavaScript 3.3.0

react-native-cli:2.0.1

反应性:0.61.2

0 个答案:

没有答案