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

Getting "TypeError: Jest: a transform must export a process function." #5

Open
Vadorequest opened this issue Jun 18, 2019 · 4 comments

Comments

@Vadorequest
Copy link

    TypeError: Jest: a transform must export a `process` function.

      at ScriptTransformer._getTransformer (node_modules/jest-runtime/build/script_transformer.js:236:15)

I'm using the same jest version as you, running jest --watch --runInBand --no-cache --config jest.config.js

@Vadorequest
Copy link
Author

Vadorequest commented Jun 18, 2019

Downgrading from "esm": "3.2.25" to "esm": "3.1.0" fixed the issue but then I get Cannot read property 'next' of undefined:

 FAIL  src/utils/redis.test.js
  utils/redis
    Redis client connection succeed
      ✕ client connected (234ms)
    Redis client connection error
      ✓ Client throw on bad IP (3ms)
      ✓ Client throw on bad password

  ● utils/redis › Redis client connection succeed › client connected

    TypeError: Cannot read property 'next' of undefined

    > 1 | import fetch from 'node-fetch'
        |                                                   ^
      2 | import { createHttpLink } from 'apollo-link-http'
      3 | import { InMemoryCache } from 'apollo-cache-inmemory'
      4 | import ApolloClient from 'apollo-client'

      at Object.n.(anonymous function) (node_modules/esm/esm.js:1:1796)

@devniel
Copy link

devniel commented Jun 28, 2019

Hello, I got the same problem.

topheman pushed a commit to topheman/webrtc-experiments that referenced this issue Jul 15, 2019
Running jest without babel.

Using [email protected] because of the following error:

```
TypeError: Jest: a transform must export a `process` function.
```

See kenotron/esm-jest#5 (comment)
topheman added a commit to topheman/webrtc-experiments that referenced this issue Jul 16, 2019
Running jest without babel.

Using [email protected] because of the following error:

```
TypeError: Jest: a transform must export a `process` function.
```

See kenotron/esm-jest#5 (comment)
@danielotieno
Copy link

@devniel I have the same issue too

How did you fix it?

@seeliang
Copy link

an alternative version

seeliang@e6ec9c0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants