0

After typing 'npm start' instead of getting QR code on the terminal I am getting a 'UnhandledPromiseRejectionWarning' error. Can please someone help me resolve this? I am a beginner at this so I dont know the meaning of errors being displayed

C:\Users\DELL\Desktop\project> npm run android

> project@1.0.0 android C:\Users\DELL\Desktop\project
> expo start --android

(node:3460) UnhandledPromiseRejectionWarning: Error: Cannot find module 'fs/promises'
Require stack:
- C:\Users\DELL\Desktop\project\node_modules\@expo\cli\build\src\start\doctor\typescript\TypeScriptProjectPrerequisite.js
- C:\Users\DELL\Desktop\project\node_modules\@expo\cli\build\src\start\startAsync.js
- C:\Users\DELL\Desktop\project\node_modules\@expo\cli\build\src\start\index.js
- C:\Users\DELL\Desktop\project\node_modules\@expo\cli\build\bin\cli
    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:\Users\DELL\Desktop\project\node_modules\@expo\cli\build\src\start\doctor\typescript\TypeScriptProjectPrerequisite.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:\Users\DELL\Desktop\project\node_modules\@expo\cli\build\src\start\startAsync.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:\Users\DELL\Desktop\project>

1 Answers1

0

I think you should upgrade your Node version to any version greater than 14.

Hamza Bashir
  • 127
  • 1
  • 10