node-harvest: TypeError: Harvest is not a constructor

Node version: 8.9.3 / 10.7.0 Harvest version: 2.0.3

const Harvest = require('harvest')
const harvest = new Harvest({/* ... */})

// TypeError: Harvest is not a constructor

What’s going on?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23 (21 by maintainers)

Commits related to this issue

Most upvoted comments

I like having that bit of backwards compatibility. If it reduces the chance people with have any issues, seems like a win.

I agree @Jameskmonger

This is a rather lightweight and simple module, so throwing a bundler in front of the packaging process doesn’t feel like it gets us much.

As for the imports, I tested both a ts file and js file just shifting the module loader and it looks like it should fix both needs well. Would like to get a better eye on it before pushing up the changes as I only had 15min to test my approach. Might be nice to pair with pulling out webpack.

I will investigate this shortly @simplyspoke