简体   繁体   中英

React Native — Cannot find module '@hapi/joi' Require stack

In my React-Native project, I downloaded the react-native-camera and react-native-qrcode-scanner libraries with node to read qr code, but I started getting such an error while running the application.

node:internal/modules/cjs/loader:926 throw err; ^

Error: Cannot find module '@hapi/joi' Require stack:

  • 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 at Function.Module._resolveFilename (node:internal/modules/cjs/loader:923:15) at Function.Module._load (node:internal/modules/cjs/loader:768:27) at Module.require (node:internal/modules/cjs/loader:995:19) at require (node:internal/modules/cjs/helpers:92:18) at t (D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js:9:40) at Object. (D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js:28:17) at Module._compile (node:internal/modules/cjs/loader:1091:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10) at Module.load (node:internal/modules/cjs/loader:971:32) at Function.Module._load (node:internal/modules/cjs/loader:812:14) { code: '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\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' ] }

You can try to use

yarn install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM