Every time I build my project using
cache: npm it will fail after files are cached.
The error upon failure is:
$ npm ci npm WARN prepare removing existing node_modules/ before installation npm ERR! code MODULE_NOT_FOUND npm ERR! Cannot find module '../pack.js' npm ERR! A complete log of this run can be found in: npm ERR! /home/travis/.npm/_logs/2019-01-15T21_56_06_702Z-debug.log
One clue is that uncached builds are using
npm install whereas builds where the cache already exists will use
The configuration I’m using is:
language: node_js node_js: - '8.3' cache: npm ...
My repository has
My latest build of
master shows the problem quite well. I’m using multiple stages. The first stage passes and thus generates a cache, but the second one will use the cache and fails. See https://travis-ci.com/bobvanderlinden/probot-auto-merge/builds/97343245
I’ve tried to delete all cache files multiple times and have tried different configuration options, but I thought the current one is the most minimal and simple and I was thinking this should just work according to the documentation. I was about to drop caching altogether, but I thought I first ask here for help.
Does anyone have any idea how to get this working correctly or why it is failing?