Skip to content

Circle CI build failed #2207

@saadaouad

Description

@saadaouad

When I try to run tests with Circle CI v2 using npm, build fails after running npm ci:

#!/bin/bash -eo pipefail
npm ci
/bin/bash: npm: command not found
Exited with code 127

This is my circleci.yml config:

version: 2
jobs:
  build:
    working_directory: /var/www
    docker:
      # using custom image, see .circleci/images/primary/Dockerfile
      - image: circleci/cci-demo-docker-primary:0.0.2
      - image: cypress/base:8
        environment:
          ...
          TERM: xterm
    parallelism: 1
    steps:
      - checkout
      - run:
          ...
      - restore_cache:
          key: v2-deps-{{ .Branch }}-{{ checksum "package.json" }}
          key: v2-deps-{{ .Branch }}-
          key: v2-deps-
      - run: npm ci
      - save_cache:
          key: v2-deps-{{ .Branch }}-{{ checksum "package.json" }}
          paths:
            - ~/.npm
            - ~/.cache
      - run: $(npm bin)/cypress run --record --key <my_record_key>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions