在我的 React-Native 項目中,我下載了帶有節點的 react-native-camera 和 react-native-qrcode-scanner 庫來讀取二維碼,但是在運行應用程序時開始出現這樣的錯誤。
node: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 (node:internal/modules/cjs/loader:923:15) 在 Z86408593C34AF77FDD160DF932F8B52。 _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) 在 t (D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js:9:40) 在 Object。 (D:\React\LCapp\LCapp\node_modules@react-native-community\cli\build\tools\config\schema.js:28:17) 在 Module._compile (node:internal/modules/cjs/loader:1091 :14) 在 Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10) 在 Module.load (node:internal/modules/cjs/loader:971:32) 在 Z86408593C34AF77FDD16Z0DF932F8B52 ._load (node: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\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'] }