簡體   English   中英

React Native — 找不到模塊 '@hapi/joi' 需要堆棧

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

在我的 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'] }

你可以嘗試使用

紗線安裝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM