angular-cli depends on an old version of ember-cli which depends on on old version of npm. I can't get my project to build on CircleCI without clearing the cache. I'm trying to use the recommended Node v6.x, which by default uses npm v3.x. So my circle.yml looks like this:
machine:
node:
version: 6.9.1
The first time the project is built on CircleCI, when node_modules is empty because it hasn't been cached yet, the effective version of npm is v3.x. So npm install works. But that adds npm v2.x to node_modules/.bin. Which is then cached. And subsequent builds then use that version of npm for npm install, which fails. CircleCI puts node_modules/.bin first before the global node bin in $PATH.
One of the dependencies installed here has an indirect dependency on npm 2.x:
http://lathonez.github.io/2016/ionic-2-unit-testing/
angular-cli depends on an old version of ember-cli which depends on on old version of npm. I can't get my project to build on CircleCI without clearing the cache. I'm trying to use the recommended Node v6.x, which by default uses npm v3.x. So my circle.yml looks like this:
The first time the project is built on CircleCI, when node_modules is empty because it hasn't been cached yet, the effective version of npm is v3.x. So
npm install
works. But that adds npm v2.x tonode_modules/.bin
. Which is then cached. And subsequent builds then use that version of npm fornpm install
, which fails. CircleCI putsnode_modules/.bin
first before the global node bin in$PATH
.I'm not sure how to resolve this.