From 3354ba8a441d87dc47440e1ff74d1009bdf653b3 Mon Sep 17 00:00:00 2001 From: Andy Chosak Date: Fri, 20 Jul 2018 10:32:41 -0400 Subject: [PATCH] disable package-lock.json on Travis Travis frontend builds run on a Linux platform, different from the Mac platform typically used for development. This can cause differences in the package-lock.json file due to the inclusion of optional modules. See this lengthy npm thread that describes the problem: https://github.com/npm/npm/issues/17722 To avoid this issue, this change runs `npm config set package-lock false` to disable the use of lock files when doing the npm install. We already do something similar to this in Capital Framework: https://github.com/cfpb/capital-framework/blob/821dd4fafb65b947ea436fd57b18a195f57e71b2/.travis.yml#L9 This change is needed because if the package-lock.json file is modified by the build, then the Python wheel name generated by setuptools-git-version is marked as dirty and won't match the latest tag. This has bitten us before on other repositories. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0cdcd0f..99d8918 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ before_script: - npm install -g bower gulp-cli - bower install script: +- npm config set package-lock false - tox - python2.7 setup.py bdist_wheel - ls dist/*