Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in latest version of ts-jest #159

Open
johngeorgewright opened this Issue Apr 3, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@johngeorgewright
Copy link

commented Apr 3, 2019

Description

Since updating to the latest version of ts-jest I've noticed errors when using this package.

    TypeError: require(...) is not a function

      at Object.<anonymous> (node_modules/sqs-consumer/dist/consumer.js:3:31)
      at Object.<anonymous> (node_modules/sqs-consumer/dist/index.js:3:18)

This is happening as the require function should no longer be used inside of an ES module.

Steps to reproduce

  1. Upgrade to latest version of TypeScript
  2. Import this module import {Consumer} from 'sqs-consumer'

Operating system

  1. macOS Mojave (10.14.3)

johngeorgewright added a commit to johngeorgewright/sqs-consumer that referenced this issue Apr 3, 2019

fix: 🐛 es modules can no longer use require
Later versions of TypeScript throw an error when an ES module uses
require

Issues: bbc#159

@johngeorgewright johngeorgewright changed the title Error in latest version of TypeScript TypeError in latest version of TypeScript Apr 3, 2019

@johngeorgewright johngeorgewright changed the title TypeError in latest version of TypeScript TypeError in latest version of ts-jest Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.