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

npm test gives setupFiles option was not found Validation error #1734

Closed
arpankotecha opened this issue Aug 24, 2017 · 4 comments
Closed

npm test gives setupFiles option was not found Validation error #1734

arpankotecha opened this issue Aug 24, 2017 · 4 comments
Assignees
Labels
maintenance User-facing maintenance tasks question / support

Comments

@arpankotecha
Copy link

arpankotecha commented Aug 24, 2017

I'm running:
mac osx 10.12.5
npm 5.3

Followed the following instructions:

git clone https://github.com/storybooks/storybook.git
cd storybook
npm install
npm run bootstrap -- --core

Ran
npm test

I get the following errors:

> storybook@3.0.0 test /Users/arpankotecha/src/react/storybook
> jest --projects ./ ./examples/react-native-vanilla

● Validation Error:

  Module <rootDir>/node_modules/react-native/jest/setup.js in the setupFiles option was not found.

  Configuration Documentation:
  https://facebook.github.io/jest/docs/configuration.html

npm ERR! Test failed.  See above for more details.

Do I need to do anything before I can run tests?

@Hypnosphi
Copy link
Member

You need to bootstrap RN-vanilla as well: npm run bootstrap -- --core --react-native-vanilla

@ndelangen I believe we should add that either to CONTRIBUTING.md or to pretest script

@ndelangen
Copy link
Member

ndelangen commented Aug 28, 2017

Yes that would resolve the issue indeed.

@arpankotecha In order to run all unit tests (including the ones for react-native) you have to have bootstrapped the react-native part of the codebase too!

You can either run:
npm run bootstrap -- --core --reactnative

or
npm run bootstrap and then select 'core' and 'react-native-vanilla'

Sorry our documentation is a bit lacking here, I'm working on improving this.

@binomialstew
Copy link

For anyone having an issue with the unknown option `--react-native-vanilla' error, it seems the --react-native-vanilla flag has been changed to --reactnative.

@Hypnosphi
Copy link
Member

Thanks @CLL80, I've edited the original comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks question / support
Projects
None yet
Development

No branches or pull requests

4 participants