version: 2
jobs:
  build:
    docker:
      - image: node:carbon
    working_directory: ~/ci-museeks
    steps:
      - checkout
      - run:
          name: Display node and npm informations
          command: |
            echo "node version $(node -v) running"
            echo "npm version $(npm -v) running"
      - restore_cache:
          keys:
            - npm-cache-{{ checksum "package-lock.json" }}
            # fallback to using the latest cache if no exact match is found
            - mpm-cache

      # - run:
      #     name: Install native dependencies
      #     command: apt update && apt install -y libdbus-1-dev libglib2.0-dev
      - run:
          name: Install dependencies
          command: npm install
      - run:
          name: Rebuild native modules
          command: npm run modules:rebuild
      - run:
          name: "Lint check: TS"
          command: "npm run lint:ts"
      - run:
          name: "Lint check: CSS"
          command: "npm run lint:css"
      - run:
          name: Build application
          command: npm run build
      - save_cache:
          paths:
            - ./node_modules
          key: npm-cache-{{ checksum "package-lock.json" }}

version: 2
jobs:
  build:
    docker:
      - image: node:carbon
    working_directory: ~/ci-museeks
    steps:
      - checkout
      - run:
          name: Display node and npm informations
          command: |
            echo "node version $(node -v) running"
            echo "npm version $(npm -v) running"
      - restore_cache:
          keys:
            - npm-cache-{{ checksum "package-lock.json" }}
            # fallback to using the latest cache if no exact match is found
            - mpm-cache

      # - run:
      #     name: Install native dependencies
      #     command: apt update && apt install -y libdbus-1-dev libglib2.0-dev
      - run:
          name: Install dependencies
          command: npm ci
      - run:
          name: Rebuild native modules
          command: npm run modules:rebuild
      - run:
          name: "Lint check: TS"
          command: "npm run lint:ts"
      - run:
          name: "Lint check: CSS"
          command: "npm run lint:css"
      - run:
          name: Build application
          command: npm run build
      - save_cache:
          paths:
            - ./node_modules
          key: npm-cache-{{ checksum "package-lock.json" }}

Use npm ci to install dependencies
Use npm ci to install dependencies
