我正在尝试测试我的nodeJs 测试用例。
这是我的 gitlab-ci.yml
test:
type: test
script:
- npm run test
执行 CI/CD 时出现此错误
/bin/sh: eval: line 117: npm: not found
如何解决这个错误?
最佳答案
您应该指定要使用 Node
图像
test:
image: node:10
type: test
script:
- npm run test
关于javascript - 执行测试用例时npm : not found error in gitlab-ci. yml文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55158241/