CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    405

    Visual Studio Code on win7 reports error: (node:6732) UnhandledPromiseRejectionWarnin

    Visual Studio Code on win7 reports error: (node:6732) UnhandledPromiseRejectionWarning ?
    Installing Visual Studio Code on win7 64bit when running the application gives the following error:
    Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.

    PS E:\abc_ReactNative\blank> npm start

    > [email protected] start E:\abc_ReactNative\blank
    > expo start

    (node:6732) UnhandledPromiseRejectionWarning: E:\abc_ReactNative\blank\node_modules\@expo\package-manager\build\ios\CocoaPodsPackageManager.js:81
    console.log(chalk_1.default.red(error.stderr ?? error.message));
    ^

    SyntaxError: Unexpected token '?'
    at Object.compileFunction (vm.js:344:18)
    at wrapSafe (internal/modules/cjs/loader.js:1048:15)
    at Module._compile (internal/modules/cjs/loader.js:1082:27)
    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> (E:\abc_ReactNative\blank\node_modules\@expo\package-manager\build\index.js:19:14)
    at Module._compile (internal/modules/cjs/loader.js:1118:30)
    (Use `node --trace-warnings ...` to show where the warnings were created)
    (node:6732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originates
    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_...ejections_mode). (rejection id: 1)
    (node:6732) [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.

  2. #2
    Join Date
    Jan 2026
    Posts
    12

    Re: Visual Studio Code on win7 reports error: (node:6732) UnhandledPromiseRejectionWa

    The error happens because your Node.js version on Windows 7 is too old to support the optional chaining operator ?. used in the Expo package. Update Node.js to at least version 14 or higher, then delete node_modules and run npm install again. This will fix the SyntaxError: Unexpected token '?' and the unhandled promise warnings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured