Skip to content

TypeError: Notification is not a constructor #6

@saggymac

Description

@saggymac

Using ...
node v8.0.0
npm 5.0.1
apns-http2 1.0.5 (globally installed, with symlink to local)

This is easily recreate-able by just using the sample code from this project's README.md.

const note = new Notification( token, pushBody);
             ^
TypeError: Notification is not a constructor
    at Object.<anonymous> (/Users/dude/src/forks/tmp/scripts/push-prod.js:24:14)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions