首页 > 解决方案 > 执行“纱线安装”时出现纱线错误

问题描述

在不包含的项目上执行yarn-install时,出现以下错误;react-nativenode-modules

D:\oman click\CLICK-APP>yarn install
yarn install v1.7.0
info No lockfile found.
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/expo: SSL Erro
r: SELF_SIGNED_CERT_IN_CHAIN".
info If you think this is a bug, please open a bug report with the information p
rovided in "D:\\oman click\\CLICK-APP\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this
command.

这是我的错误日志文件...请帮帮我

Arguments: 
  C:\Program Files\nodejs\node.exe C:\Users\ganeshk\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js install

PATH: 
  C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\:C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files\Java\jre7\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Users\ganeshk\AppData\Roaming\npm

Yarn version: 
  1.7.0

Node version: 
  8.11.3

Platform: 
  win32 x64

Trace: 
  Error: https://registry.yarnpkg.com/expo: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
      at Request.module.exports.Request.onRequestResponse (C:\Users\ganeshk\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:135442:24)
      at emitOne (events.js:116:13)
      at ClientRequest.emit (events.js:211:7)
      at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:543:21)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
      at TLSSocket.socketOnData (_http_client.js:440:20)
      at emitOne (events.js:116:13)
      at TLSSocket.emit (events.js:211:7)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)

npm manifest: 
  {
    "name": "CLICK-OMAN",
    "version": "0.1.0",
    "private": true,
    "devDependencies": {
      "jest-expo": "25.0.0",
      "react-native-scripts": "1.14.0",
      "react-test-renderer": "16.3.1"
    },
    "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
    "scripts": {
      "start": "react-native-scripts start",
      "eject": "react-native-scripts eject",
      "android": "react-native-scripts android",
      "ios": "react-native-scripts ios",
      "test": "jest"
    },
    "jest": {
      "preset": "jest-expo"
    },
    "dependencies": {
      "my-local-dep": "link:../../local/path",
      "expo": "25.0.0",
      "native-base": "^2.6.0",
      "react": "16.3.1",
      "react-native": "~0.55.2",
      "react-native-axios": "^0.17.1",
      "react-native-datepicker": "^1.7.2",
      "react-native-elements": "^0.19.1",
      "react-native-image-header-scroll-view": "^0.8.2",
      "react-native-material-bottom-navigation": "^1.0.0",
      "react-native-material-dropdown": "^0.11.1",
      "react-native-modal": "^6.1.0",
      "react-native-modal-selector": "^0.0.27",
      "react-native-swiper-flatlist": "^1.0.7",
      "react-native-tab-view": "^1.0.2",
      "react-navigation": "^2.4.1",
      "react-redux": "^5.0.7",
      "redux": "^4.0.0",
      "redux-form": "^7.4.2",
      "redux-persist": "^5.10.0",
      "redux-thunk": "^2.3.0",
      "remote-redux-devtools": "^0.5.12"
    }
  }

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

标签: react-nativenpmyarnpkg

解决方案


推荐阅读