eventbrite-sdk-javascript icon indicating copy to clipboard operation
eventbrite-sdk-javascript copied to clipboard

Require method DOES NOT work on Node 10

Open filetvignon opened this issue 6 years ago • 3 comments

The method described in the Docs to use this sdk in Node DOES NOT WORK, at least not in Node 10.15 with npm 6.6:

const eventbrite = require('eventbrite');

// Create configured Eventbrite SDK
const sdk = eventbrite({token: 'OATH_TOKEN_HERE'});

This yields a "eventbrite is not a function" error. Here's the workaround:

const eventbrite = require('eventbrite').default;

Your Environment

  • SDK version: 1.1.0
  • Node version: 10.15.0
  • NPM version: 6.6.0
  • Operating system: Windows 10

filetvignon avatar Jan 28 '19 22:01 filetvignon

That appears to be consistent with what I was seeing in CodeSandbox.

I am thinking it is related to this line in our build out. https://travis-ci.org/eventbrite/eventbrite-sdk-javascript/jobs/486018848#L570

A PR to fix this would be appreciated!

kwelch avatar Jan 29 '19 17:01 kwelch

I am having the same issue, please let me know if there are any fixes!

SuragSheth avatar Feb 13 '19 07:02 SuragSheth

I'm having the same issue and would love to know the progress on this! However, adding .default worked: https://stackoverflow.com/questions/54410860/cant-use-eventbrite-javascript-sdk-installed-via-npm-node-js

loferris avatar Aug 30 '19 19:08 loferris