我的gitlab ci multi-runner没有';无法识别npm命令

我的gitlab ci multi-runner没有';无法识别npm命令,npm,gitlab-ci-runner,Npm,Gitlab Ci Runner,我正在用docker compose把这个旋转起来 奇怪的是,我的作业被npm命令卡住,无法识别。 但我的基本映像是node:latest,所以它应该可以工作 这是我的.gitlab-ci.yml文件: image: node:latest cache: paths: - node_modules/ before_script: - npm install - bower install --allow-root stages: - build_deploy

我正在用docker compose把这个旋转起来

奇怪的是,我的作业被npm命令卡住,无法识别。 但我的基本映像是node:latest,所以它应该可以工作

这是我的.gitlab-ci.yml文件:

image: node:latest

cache:
  paths:
   - node_modules/

before_script:
   - npm install
   - bower install --allow-root

stages:
   - build_deploy

build_&_deploy_app:
  stage: build_deploy
  only:
   - master
script:
   - gulp build -production
   - gulp deploy

variables:
   GIT_SSL_NO_VERIFY: "1"
注意:我需要打开SSL验证,因为这是另一个需要解决的问题

作业的输出为:

gitlab-ci-multi-runner 1.1.4 (9e2fd1a)
WARNING: image is not supported by selected executor and shell
Using Shell executor...
Running on 6687502ce71f...
Fetching changes...
HEAD is now at 42e9d51 Update .gitlab-ci.yml
Checking out 42e9d511 as master...
HEAD is now at 42e9d51... Update .gitlab-ci.yml
Checking cache for default...
$ npm prune
bash: line 56: npm: command not found

ERROR: Build failed: exit status 1

您的跑步者配置是什么?您似乎只是将其配置为shell runner,而不是docker。我是以runner_EXECUTOR=shell的身份运行它的,我将其更改为docker,但它给出了相同的错误。我更新了作业输出。看起来它总是以shell执行器的身份运行运行运行程序。因此,您必须将其配置为使用docker运行程序您的运行程序配置是什么?您似乎只是将其配置为shell runner,而不是docker。我是以runner_EXECUTOR=shell的身份运行它的,我将其更改为docker,但它给出了相同的错误。我更新了作业输出。它看起来似乎总是以shell执行器的身份运行运行运行程序。因此,您必须将其配置为使用docker运行程序