question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: environment.dispose is not a function

See original GitHub issue

What is the current behavior?

All tests files fail with the following error:

 TypeError: environment.dispose is not a function

      at Promise.resolve.then (../../../../../usr/local/lib/node_modules/jest/node_modules/jest-runner/build/run_test.js:116:17)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Tests were running yesterday.

Removing node_modules & reinstalling produced no difference.

Dependencies: “jest”: “^22.1.4”,

with presets: “jest-expo”: “^25.0.0”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

34reactions
etcetera8commented, Feb 9, 2018

npm install jest-cli fixed this one for me

15reactions
AndreiCalazanscommented, Mar 13, 2018

I also had to uninstall jest first, npm uninstall jest then do npm install jest-cli

I’m using create-react-app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

environment.dispose is not a function when running npm test ...
Show activity on this post. 1) install jest-cli - This would resolve the TypeError: environment. dispose is not a function. git init to...
Read more >
environment.dispose is not a function when running npm test ...
[Solved]-TypeError: environment.dispose is not a function when running npm test-Reactjs ... 1) install jest-cli - This would resolve the TypeError: environment.
Read more >
Troubleshooting Jest with React: environment.setup is not a ...
This error affected two things: Jest test runs failed with the error TypeError: environment.setup is not a function . Travis CI passed despite ......
Read more >
Group.dispose() is not a function - Questions - three.js forum
Just creating a group does not allocated disposable resources. The relevant entities are mostly materials, geometries and textures. Since they can be reused ......
Read more >
igDataChart: dispose is not a function | Infragistics Forums
igDataChart: dispose is not a function. Jack posted over 7 years ago. I am trying to display a composite data chart by following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found