Harsh Patel
Harsh Patel

Reputation: 6830

npm: not found error in gitlab-ci.yml file while executing test cases

I am trying to test my test-cases of nodeJs.

Here is my gitlab-ci.yml

test:
  type: test
  script:
    - npm run test

while executing CI/CD I got this error

/bin/sh: eval: line 117: npm: not found

How to solve this error?

Upvotes: 3

Views: 5924

Answers (1)

Avraham
Avraham

Reputation: 938

You should specify that you want to use the node image

test:
  image: node:10
  type: test
  script:
    - npm run test

Upvotes: 7

Related Questions