Continuous integration 缓存节点_模块以加速管道不工作

Continuous integration 缓存节点_模块以加速管道不工作,continuous-integration,yaml,gitlab-ci,pipeline,Continuous Integration,Yaml,Gitlab Ci,Pipeline,我试图通过在作业之间缓存我的节点\模块文件夹来加速我的管道。(我是ci/cd新手,两天前开始学习,请耐心听我说)我遵循以下指南: My.gitlab-ci.yml文件位于根目录中,我的其他文件位于根目录中的文件夹中。 我在运行管道时收到以下警告:警告:.npm/:没有匹配的文件 这是我在yml文件中的代码: default: image: node:12 stages: - build # - test # - prettier # Cache modules in betw

我试图通过在作业之间缓存我的节点\模块文件夹来加速我的管道。(我是ci/cd新手,两天前开始学习,请耐心听我说)我遵循以下指南:

My.gitlab-ci.yml文件位于根目录中,我的其他文件位于根目录中的文件夹中。 我在运行管道时收到以下警告:警告:.npm/:没有匹配的文件

这是我在yml文件中的代码:


default:
  image: node:12

stages: 
  - build
#  - test
#  - prettier

# Cache modules in between jobs
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - .npm/

before_script:
  - npm ci --cache .npm --prefer-offline

#test_async:
#  stage: test
#  script:
#    - node ./specs/start.js ./specs/async.spec.js

build:
  stage: build
  before_script:
    - cd ceWebsite
    - npm install
  script:
    - npx gatsby build



请随便问我是否遗漏了什么

.npm/:没有匹配的文件。
表示项目根目录中没有名为
.npm
的文件夹。它可能在
ceWebsite
子文件夹中吗?