I have two related projects in one repository, each with its own build process in its own package.json. I’ve been using this setup for a month or so, and Travis seems to work with it pretty well.
I recently added a mapping to the jsconfig of one project to point to a directory in the other so that I could share some typescript interfaces between the two. It works well locally, but once I created a pull request, the build fails on Travis.
More specifically, the pre-build linting fails on the API project, which is the one that has the mapping. Here’s the build in question. On line 503, you’ll see where it’s pulling the tslint from the Web project, rather than in the directory where it’s running. The Web project involves React, and therefore has react rules loaded; since the API project doesn’t have those rules installed, tslint throws an error. If I comment out the path mapping, there is no error.
I can run the same build locally and have no problem; the problem only happens when it tries to run on the Travis environment.
Any suggestions here? Not having duplicate interface declarations is quite handy, so I’d love to be able to use the pathing.