I've set up a basic application with CRA and Mobx and using Custom React Scripts to get decorators working in Create React App.
It works great but when I setup Travis CI to run on Github pull requests it fails because of the decorators. It fails when running npm run test or npm run build.
I figured it was simply a configuration issue with Travis CI so I tried many different changes and options in my .travis.yml file but couldn't get it to work.
I transferred my app to use React App Rewired instead and it worked fine on Travis CI without any issues.
Not entirely sure why this is happening but thought I would report it in the hopes that someone can assist me now or others in the future. Would be cool if this could support decorators on Travis out of the box.
Thank you.
Here's my current .travis.yml file that works using React App Rewired:
language: node_js
node_js:
- 9
cache:
directories:
- node_modules
script:
- cd react-ui/ && npm install && npm install --only=dev --no-shrinkwrap && npm run test && CI=false npm run build
branches:
only:
- master
I've set up a basic application with CRA and Mobx and using Custom React Scripts to get decorators working in Create React App.
It works great but when I setup Travis CI to run on Github pull requests it fails because of the decorators. It fails when running
npm run test
ornpm run build
.I figured it was simply a configuration issue with Travis CI so I tried many different changes and options in my
.travis.yml
file but couldn't get it to work.I transferred my app to use React App Rewired instead and it worked fine on Travis CI without any issues.
Not entirely sure why this is happening but thought I would report it in the hopes that someone can assist me now or others in the future. Would be cool if this could support decorators on Travis out of the box.
Thank you.
Here's my current
.travis.yml
file that works using React App Rewired: