Travis error when committing on github
lcnogueira opened this issue · 2 comments
Hi, Herman.
I'm using this CLI to share some custom hooks on npm. However, when I commit some code to the master branch on github, travis throws an error when it tries to run yarn test
. The error is the following one:
The react-scripts package provided by Create React App requires a dependency:
"eslint": "^6.6.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
/home/travis/build/lcnogueira/awesome-react-custom-hooks/node_modules/eslint (version: 5.16.0)
As you can see, the problem is the eslint
version inside the example
folder (it uses create-react-app
) is different from the one in the root folder.
I followed the instructions (https://travis-ci.com/lcnogueira/awesome-react-custom-hooks/builds/148590935
) to solve the problem, but It only worked when I set an environment variable SKIP_PREFLIGHT_CHECK
inside the travis.yml
file (the same way we have inside .env
file):
language: node_js
node_js:
- 8
env:
- SKIP_PREFLIGHT_CHECK=true
Do you think is it worth including this variable inside travis.yml
by default?
There is already a .env
file. But yeah, good idea
I've sent a PR (#18 ). Feel free to refuse it if you think It's not necessary. Anyway, I think it's a good idea setting this variable by default since it throws an error if we don't do it.
Thanks, Herman ✌️