在我的React Native项目中,我下载了带有node的React Native camera和React nativeqrcode scanner库来读取qr码,但我在运行应用程序时开始遇到这样的错误。
节点:internal/modules/cjs/loader:926投掷失误;^
错误:找不到模块'@hapi/joi'需要堆栈:
- D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js
- D: \React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\readConfigFromDisk.js
- D: \React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\index.js
- D: \React\LCapp\LCapp\node_modules@react-native-community\cli\build\commands\install\install.js
- D: \React\LCapp\LCapp\node_modules@react-native-community\cli\build\commands\index.js
- D: \React\LCapp\LCapp\node_modules@react-native-community\cli\build\index.js
- D: \React\LCapp\LCapp\node_modules@react-native-community\cli\build\bin.js位于Function.Module.resolveFilename(节点:internal/modules/cjs/loader:923:15(位于Function.Module_load(节点:internal/modules/cjs/loader:768:27(在Module.require(节点:internal/modules/cjs/loader:995:19(at require(节点:internal/modules/cjs/helpers:92:18(在t(D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js:9:40(在对象处。(D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js:28:17(在模块中_compile(节点:internal/modules/cjs/loader:1091:14(位于Object.Module_extensions..js(节点:internal/modules/cjs/loader:1120:10(在Module.load(节点:internal/modules/cjs/loader:971:32(位于Function.Module_load(节点:internal/modules/cjs/loader:812:14({代码:"MODULE_NOT_FOUND",requireStack:['D:\React\LCapp\LCapp\node_modules\@React native community\cli\build\tools\config\schema.js','D:\React\LCapp\LCapp\node_modules\@React native community\cli\build\tools\config\readConfigFromDisk.js',
'D:\React\LCapp \LCapp\ node_modules\@React native-community\cli\bbuild\tools\config \index.js','D:\React\LCapp\LCapp\node_modules\@React native community\cli\build\commands\install\install.js','D:\React\LCapp\LCapp\node_modules\@React native community\cli\build\commands\index.js','D:\React\LCapp\LCapp\node_modules\@React native community\cli\build\index.js','D:\React\LCapp\LCapp\node_modules\@React native community\cli\build\bin.js']}
您可以尝试使用
纱线安装