Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Unhandled promise rejection #47

@pferlito

Description

@pferlito

I'm no Node.js expert but I can't get this to work.

  • Installed Simple Outh module, obtained token
  • Installed Waterwheel drupal module
  • Verified token is working by querying /entity/types/user?_format=json which returns 200
  • Cloned this repo into /libraries/waterwheel-js
  • npm i
  • npm t (all tests passed)
  • Skipped npm run build (trying this in node 7.0.0)

Created the following test.js file and put it in /libraries/waterwheel-js

const Waterwheel = require('./lib/waterwheel.js');

const waterwheel = new Waterwheel({base: 'http://d8-dev.site', credentials: {oauth: 'RsWv76cNKhbHTVZsGraIE88-dxKWWrBoQ34M70GLPzY'}});

waterwheel.populateResources()
  .then(res => {
    console.log(res);
  });

ran node test.js and got this:
(node:80914) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error
(node:80914) 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions