Skip to content

UnhandledPromiseRejectionWarning: PolyFillNotAvailable #738

@luizrobertomeier

Description

@luizrobertomeier

I'm following the official docs : "Write a Node.js app to get Outlook mail, calendar, and contacts"

Official URL: https://docs.microsoft.com/en-us/outlook/rest/node-tutorial

And I'm getting the following error:

(node:32431) UnhandledPromiseRejectionWarning: PolyFillNotAvailable: Library cannot function without fetch. So, please provide polyfill for it. at Object.exports.validatePolyFilling (/home/myfolder/node-tutorial/node_modules/@microsoft/microsoft-graph-client/lib/src/ValidatePolyFilling.js:27:21) at new Client (/home/myfolder/node-tutorial/node_modules/@microsoft/microsoft-graph-client/lib/src/Client.js:36:35) at Function.Client.initWithMiddleware (/home/myfolder/node-tutorial/node_modules/@microsoft/microsoft-graph-client/lib/src/Client.js:92:20) at Function.Client.init (/home/myfolder/node-tutorial/node_modules/@microsoft/microsoft-graph-client/lib/src/Client.js:81:23) at /home/myfolder/node-tutorial/routes/calendar.js:19:33 (node:32431) 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(). (rejection id: 2)
node -v = v12.11.1

The section: Mail, Calendar and Contacts don't works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: fixedFix is complete and will be available to customers as soon as doc updates are published

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions