Error running jest tests on jest master branch
See original GitHub issueHey guys,
I am planing to make a PR but for some reason I am getting a lot of errors running jest tests in the master branch on a clean clone:
yarn test v0.17.8
$ yarn typecheck && yarn lint && yarn jest
yarn typecheck v0.17.8
$ flow check --include-warnings
Error: packages/babel-jest/src/index.js:16
16: import jestPreset from 'babel-preset-jest';
^^^^^^^^^^^^^^^^^^^ babel-preset-jest. Required module not found
Error: packages/babel-jest/src/index.js:18
18: import babelIstanbulPlugin from 'babel-plugin-istanbul';
^^^^^^^^^^^^^^^^^^^^^^^ babel-plugin-istanbul. Required module not found
Error: packages/jest-changed-files/src/index.js:15
15: import throat from 'throat';
^^^^^^^^ throat. Required module not found
Error: packages/jest-circus/src/format_node_assert_errors.js:10
10: import type {DiffOptions} from 'jest-diff/src/diff_strings.js';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jest-diff/src/diff_strings.js. Required module not found
Error: packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js:14
14: import {extractExpectedAssertionsErrors, getState, setState} from 'expect';
^^^^^^^^ expect. Required module not found
Error: packages/jest-circus/src/legacy_code_todo_rewrite/jest_expect.js:12
12: import expect from 'expect';
^^^^^^^^ expect. Required module not found
Error: packages/jest-cli/src/cli/index.js:25
25: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-cli/src/cli/index.js:36
36: import {sync as realpath} from 'realpath-native';
^^^^^^^^^^^^^^^^^ realpath-native. Required module not found
Error: packages/jest-cli/src/reporters/coverage_worker.js:12
12: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-cli/src/reporters/notify_reporter.js:14
14: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-cli/src/reporters/notify_reporter.js:17
17: import notifier from 'node-notifier';
^^^^^^^^^^^^^^^ node-notifier. Required module not found
Error: packages/jest-cli/src/run_jest.js:19
19: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-cli/src/test_scheduler.js:24
24: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-cli/src/watch.js:17
17: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-docblock/src/index.js:10
10: import detectNewline from 'detect-newline';
^^^^^^^^^^^^^^^^ detect-newline. Required module not found
Error: packages/jest-environment-jsdom/src/index.js:17
17: import {JSDOM, VirtualConsole} from 'jsdom';
^^^^^^^ jsdom. Required module not found
Error: packages/jest-haste-map/src/crawlers/watchman.js:15
15: import watchman from 'fb-watchman';
^^^^^^^^^^^^^ fb-watchman. Required module not found
Error: packages/jest-haste-map/src/index.js:32
32: import sane from 'sane';
^^^^^^ sane. Required module not found
Error: packages/jest-jasmine2/src/assert_support.js:10
10: import type {DiffOptions} from 'jest-diff/src/diff_strings';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jest-diff/src/diff_strings. Required module not found
Error: packages/jest-jasmine2/src/jasmine_async.js:17
17: import isGeneratorFn from 'is-generator-fn';
^^^^^^^^^^^^^^^^^ is-generator-fn. Required module not found
Error: packages/jest-jasmine2/src/jest_expect.js:12
12: import expect from 'expect';
^^^^^^^^ expect. Required module not found
Error: packages/jest-jasmine2/src/setup_jest_globals.js:13
13: import {extractExpectedAssertionsErrors, getState, setState} from 'expect';
^^^^^^^^ expect. Required module not found
Error: packages/jest-leak-detector/src/index.js:41
41: weak = require('weak');
^^^^^^ weak. Required module not found
Error: packages/jest-message-util/src/index.js:18
18: import {codeFrameColumns} from '@babel/code-frame';
^^^^^^^^^^^^^^^^^^^ @babel/code-frame. Required module not found
Error: packages/jest-message-util/src/index.js:19
19: import StackUtils from 'stack-utils';
^^^^^^^^^^^^^ stack-utils. Required module not found
Error: packages/jest-runner/src/index.js:22
22: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-runner/src/index.js:24
24: import throat from 'throat';
^^^^^^^^ throat. Required module not found
Error: packages/jest-runner/src/test_worker.js:14
14: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-runtime/src/cli/index.js:14
14: import exit from 'exit';
^^^^^^ exit. Required module not found
Error: packages/jest-runtime/src/script_transformer.js:23
23: import babelPluginIstanbul from 'babel-plugin-istanbul';
^^^^^^^^^^^^^^^^^^^^^^^ babel-plugin-istanbul. Required module not found
Error: packages/jest-runtime/src/script_transformer.js:31
31: import {sync as realpath} from 'realpath-native';
^^^^^^^^^^^^^^^^^ realpath-native. Required module not found
Error: packages/jest-validate/src/utils.js:12
12: import leven from 'leven';
^^^^^^^ leven. Required module not found
Error: packages/jest-worker/src/index.js:12
12: import mergeStream from 'merge-stream';
^^^^^^^^^^^^^^ merge-stream. Required module not found
Error: packages/jest/src/jest.js:10
10: import cli from 'jest-cli';
^^^^^^^^^^ jest-cli. Required module not found
Error: types/TestRunner.js:20
20: import type {TestWatcher as _TestWatcher} from 'jest-cli';
^^^^^^^^^^ jest-cli. Required module not found
Found 35 errors
error Command failed with exit code 2.
error Command failed with exit code 1.
Node version: v8.9.4
, yarn version: 0.17.8
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Jest CLI Options
If Jest doesn't exit at the end of a test run, it means external resources are still being held on to or timers...
Read more >GitHub Actions only /tmp/unit-tests-2f311f40.sh: 1: jest: not found
This was causing npm to only install the dependencies and not the devDependencies. equivalant of doing npm install --prod once i removed this ......
Read more >Jest and the `--changedSince` flag in GitHub Actions CI
Now, this seems to be working perfectly - it'll diff changes between the current PR's HEAD and master , running only the tests...
Read more >Best kept Jest secret: Testing only changed files with coverage ...
If you're using Jest today and run your entire testing suite on every PR ... all changes between two git branches that are...
Read more >How to solve Jest storybook test error “cannot find ...
I wanted to update my current branch with the master branch. In the process, I encountered a merge conflict with the storybook snapshot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@varunsharma27 this issue is about running Jest’s own unit tests on the master branch of Jest. If you are using Jest in another project, then this issue is not related at all to the issue you’re experiencing.
However, Jest does work, so it’s something with your setup. We recommend using StackOverflow or our discord channel for questions.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.