在输入'npm start'而不是在终端上获得QR码后,我得到'UnhandledPromiseRejectionWarning'错误。有人能帮我解决这个问题吗?我是初学者,所以我不知道显示错误的含义
C:UsersDELLDesktopproject> npm run android
> project@1.0.0 android C:UsersDELLDesktopproject
> expo start --android
(node:3460) UnhandledPromiseRejectionWarning: Error: Cannot find module 'fs/promises'
Require stack:
- C:UsersDELLDesktopprojectnode_modules@expoclibuildsrcstartdoctortypescriptTypeScriptProjectPrerequisite.js
- C:UsersDELLDesktopprojectnode_modules@expoclibuildsrcstartstartAsync.js
- C:UsersDELLDesktopprojectnode_modules@expoclibuildsrcstartindex.js
- C:UsersDELLDesktopprojectnode_modules@expoclibuildbincli
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:962:15)
at Function.Module._load (internal/modules/cjs/loader.js:838:27)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:UsersDELLDesktopprojectnode_modules@expoclibuildsrcstartdoctortypescriptTypeScriptProjectPrerequisite.js:5:40)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:UsersDELLDesktopprojectnode_modules@expoclibuildsrcstartstartAsync.js:15:38)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either
by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:UsersDELLDesktopproject>
我认为你应该把你的Node版本升级到大于14的任何版本。