gitlab 运行程序 npm 安装错误“npm ERR!prepareGitDep”

如何解决gitlab 运行程序 npm 安装错误“npm ERR!prepareGitDep”

image: jangrewe/gitlab-ci-android

variables:
  ANDROID_COMPILE_SDK: "29"
  ANDROID_BUILD_TOOLS: "29.0.3"
  ANDROID_SDK_TOOLS:   "6858069" 

before_script:
  - sudo yum remove -y nodejs
  - sudo yum install -y gcc-c++ make
  - curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
  - sudo yum install -y nodejs
  - node -v 
  - npm -v 
  - npm cache clean --force
  - npm install
  - npx jetify
  # - react-native link #Link the resources
  - chmod +x android/gradlew #Provide permission for execution

stages:
- build

build:
  stage: build
  tags:
  - AndroidBuild
  script:
  - ./gradlew assembleProdRelease
  artifacts:
    paths:
    - android/app/build/output/all/

上面是我用来构建 RN android 的 gitlab-ci.yml,我在 npm install 上遇到了以下 npm 错误

$ npm install
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information,see https://github.com/axios/axios/pull/3410
npm WARN deprecated @react-native-community/async-storage@1.11.0: Async Storage has moved to new organization: https://github.com/react-native-async-storage/async-storage
npm WARN deprecated react-native-dotenv@0.2.0: critical bugs fixed in v2.2.0
npm WARN deprecated react-navigation-stack@1.10.3: This version of React Navigation Stack is no longer supported. Please upgrade to 2.x.x. See https://reactnavigation.org/docs/4.x/upgrading-from-3.x#react-navigation-stack for instructions.
npm WARN deprecated deep-assign@3.0.0: Check out `lodash.merge` or `merge-options` instead.
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package,see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! prepareGitDep 1> 
npm ERR! prepareGitDep > appium-windows-driver@1.8.0 install /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/appium-windows-driver
npm ERR! prepareGitDep > node install-npm.js
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > core-js@2.6.11 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/@babel/polyfill/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > core-js@2.6.11 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/appium-tizen-driver/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > core-js@2.6.11 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/babel-runtime/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > core-js@3.6.4 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > appium-chromedriver@4.21.0 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/appium-chromedriver
npm ERR! prepareGitDep > node install-npm.js
npm ERR! prepareGitDep 
npm ERR! prepareGitDep [12:31:12] [Chromedriver Install] Installing Chromedriver version '80.0.3987.106' for platform 'linux' and architecture '64'
npm ERR! prepareGitDep [12:31:12] [Chromedriver Install] Opening temp file to write 'chromedriver_linux64' to...
npm ERR! prepareGitDep [12:31:12] [Chromedriver Install] Opened temp file '/tmp/2021116-109537-1ggtq6c.267m/chromedriver_linux64.zip'
npm ERR! prepareGitDep [12:31:12] [Chromedriver Install] Downloading https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip...
npm ERR! prepareGitDep [12:31:13] [Chromedriver Install] Writing binary content to /tmp/2021116-109537-1ggtq6c.267m/chromedriver_linux64.zip...
npm ERR! prepareGitDep [12:31:13] [Chromedriver Install] Extracting /tmp/2021116-109537-1ggtq6c.267m/chromedriver_linux64.zip to /tmp/2021116-109537-1ggtq6c.267m/chromedriver_linux64
npm ERR! prepareGitDep [12:31:13] [Chromedriver Install] Creating /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux...
npm ERR! prepareGitDep [12:31:13] [Chromedriver Install] Copying unzipped binary,reading from /tmp/2021116-109537-1ggtq6c.267m/chromedriver_linux64/chromedriver...
npm ERR! prepareGitDep [12:31:13] [Chromedriver Install] Writing to /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64...
npm ERR! prepareGitDep [12:31:13] [Chromedriver Install] /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 successfully put in place
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > core-js@2.6.12 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/core-js
npm ERR! prepareGitDep > node -e "try{require('./postinstall')}catch(e){}"
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > react-native-macos@0.60.0-microsoft.73 postinstall /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f/node_modules/react-native-macos
npm ERR! prepareGitDep > node scripts/postInstall.js
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep > react-native-webview@10.3.2 prepare /home/gitlab-runner/.npm/_cacache/tmp/git-clone-c8ee661f
npm ERR! prepareGitDep > yarn build
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--also=dev` instead.
npm ERR! prepareGitDep npm WARN deprecated babel-eslint@10.0.3: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm ERR! prepareGitDep npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm ERR! prepareGitDep npm WARN deprecated @types/jest-diff@24.3.0: This is a stub types definition. jest-diff provides its own type definitions,so you do not need this installed.
npm ERR! prepareGitDep npm WARN deprecated request@2.88.2: request has been deprecated,see https://github.com/request/request/issues/3142
npm ERR! prepareGitDep npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package,see https://github.com/request/request/issues/3142
npm ERR! prepareGitDep npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm ERR! prepareGitDep npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm ERR! prepareGitDep npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! prepareGitDep npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please,upgrade your dependencies to the actual version of core-js@3.
npm ERR! prepareGitDep npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information,see https://github.com/axios/axios/pull/3410
npm ERR! prepareGitDep npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! prepareGitDep npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only,flatted is its successor.
npm ERR! prepareGitDep npm WARN deprecated @babel/polyfill@7.12.1: ? This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm ERR! prepareGitDep npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm ERR! prepareGitDep npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! prepareGitDep npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! prepareGitDep npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package,see https://github.com/request/request/issues/3142
npm ERR! prepareGitDep npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! prepareGitDep npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! prepareGitDep Not installing WinAppDriver since did not detect a Windows system
npm ERR! prepareGitDep sh: yarn: command not found
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! syscall spawn
npm ERR! prepareGitDep npm ERR! file sh
npm ERR! prepareGitDep npm ERR! errno ENOENT
npm ERR! prepareGitDep npm ERR! react-native-webview@10.3.2 prepare: `yarn build`
npm ERR! prepareGitDep npm ERR! spawn ENOENT
npm ERR! prepareGitDep npm ERR! 
npm ERR! prepareGitDep npm ERR! Failed at the react-native-webview@10.3.2 prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep 
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/gitlab-runner/.npm/_logs/2021-02-16T04_31_14_357Z-debug.log
npm ERR! prepareGitDep 
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitlab-runner/.npm/_logs/2021-02-16T04_31_14_497Z-debug.log
Cleaning up file based variables
ERROR: Job failed: exit status 1

当我尝试 git pull 到另一个 centos 服务器时,npm install 工作正常。有什么帮助吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res