npm ERR!无法读取未定义的属性“ totalDependencies”

时间:2019-05-23 05:40:09

标签: npm-install pipeline gitlab-ci gitlab-ci-runner verdaccio

我正在使用Gitlab管道来安装和构建NPM项目。它工作正常,但有时管道由于npm的“ totalDependencies”问题而失败,我正在使用node:10.9.0版本,而且我正在使用verdaccio私有注册表。

下面是我的npm步骤的gitlab ci文件。

build:
  image: node:10.9.0
  stage: build
  script:
    - echo "Prepare build"
    - npm set registry https://node-myprivateregistery.com
    - echo "//node-myprivateregistery.com/:_authToken=\"$NPM_AUTH_TOKEN\"" >> ~/.npmrc
    - npm install
    - npm run build:dev
  allow_failure: false
  artifacts:
      paths:
        - build/
  only:
    - master

管道运行时出现错误提示。



npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! Cannot read property 'totalDependencies' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-05-21T12_43_15_010Z-debug.log
ERROR: Job failed: command terminated with exit code 1

0 个答案:

没有答案