CircleCI npm install seems to be rebuilding node for all distros on every build?

Around 2 days ago some issues happened with node-sass, that prevented CircleCI from building. I tried adding “rebuild node-sass” to no avail and removed it agian, ended up bumping node-sass up from 4.11 to 4.12 and that fixed it. Today i noticed some veeeery long build times compared to normal (5-10 times as long). I inspected the workflow and found the culprit to be “npm install”. Now im not the most savvy around CircleCI and buildscripts in general so im kinda at a loss here at what to do.
Heres my config:

version: 2
jobs:
  build:
    docker:
    - image: circleci/node
    working_directory: ~/wfrpg
    steps:
    - checkout
    - restore_cache:
        keys:
        - v1-dependencies-{{ checksum "package.json" }}
        - v1-dependencies-
    - run: npm install
    - run: npm run build
    - run: ./node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN
    - save_cache:
        paths:
        - node_modules
        key: v1-dependencies-{{ checksum "package.json" }}
workflows:
  version: 2
  workflow:
    jobs:
    - build:
        filters:
          branches:
            only:
            - master

Heres the output of npm install
https://pastebin.com/79YmGY7G

1 Like

Bring up my post

Hi Chillo, does using npm ci instead help?

I tried it but same issue persists. I just tried something new, if i delete package-lock and node_modules locally and do a fresh install i get the sameish issue, although not nearly as long and as big a log. But it does hint at it not being a CI issue https://pastebin.com/GJP0YKVt