const fetch = require('node-fetch') in es6 code example Example: how to install node fetch $ npm install node-fetch --save