我一直在玩GitLab CI
,遇到了一个问题。跑步者说:
npm命令未找到
我的gitlab-cli.yml
image: node:latest
cache:
paths:
- node_modules/
before_script:
- npm install
unit test:
stage: test
script:
- npm run unit
Runner Exceutor是Shell。也尝试使用docker执行器。还是同样的错误。
有人能帮忙吗?
禁用您的共享执行器并启用您的注册跑步者
那么您使用的是什么类型的跑步器?共享跑步者?
这是我的.gitlab-ci.yml
的一个样本。希望这对你有帮助!
stages:
- build
variables:
VERSION: "1.0"
build:
image: node:12.14.0-alpine3.10
stage: build
before_script:
- npm i
- npm install -g @angular/cli
script:
- ng build
artifacts:
paths:
- dist/