-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Milestone
Description
I'm attempting to build an express app with Node 11. I've added the following to my app.js
while my arcgis-rest-js calls are made in various Util modules. I never directly call request - only using the geocoding and Portal module methods.
const fetch = require('node-fetch');
import * as RestRequest from '@esri/arcgis-rest-request';
// use node-fetch for each request instead of relying on a global
RestRequest.setDefaultRequestOptions({ fetch })
but I still get the error
UnhandledPromiseRejectionWarning: Error: `arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing `fetch`, `FormData`. We recommend installing the `node-fetch`, `isomorphic-form-data` modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.
Metadata
Metadata
Assignees
Labels
No labels