yarn create koishi时报错

yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-koishi@6.3.2" with binaries:
      - create-koishi
[##########################] 26/26
  Create Koishi  v6.3.2

√ Project name: ... koishi-app
  Scaffolding project in koishi-app ...
AxiosError: read ECONNRESET
    at AxiosError.from (C:\Users\34148\AppData\Local\Yarn\Data\global\node_modules\axios\dist\node\axios.cjs:876:14)
    at RedirectableRequest.handleRequestError (C:\Users\34148\AppData\Local\Yarn\Data\global\node_modules\axios\dist\node\axios.cjs:3156:25)
    at RedirectableRequest.emit (node:events:519:28)
    at eventHandlers.<computed> (C:\Users\34148\AppData\Local\Yarn\Data\global\node_modules\follow-redirects\index.js:38:24)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at Axios.request (C:\Users\34148\AppData\Local\Yarn\Data\global\node_modules\axios\dist\node\axios.cjs:4269:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async scaffold (C:\Users\34148\AppData\Local\Yarn\Data\global\node_modules\create-koishi\lib\index.js:119:26)
    at async start (C:\Users\34148\AppData\Local\Yarn\Data\global\node_modules\create-koishi\lib\index.js:194:5) {
  syscall: 'read',
  code: 'ECONNRESET',
  errno: -4077,
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http', 'fetch' ],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: [class Blob] },
    validateStatus: [Function: validateStatus],
    headers: Object [AxiosHeaders] {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': undefined,
      'User-Agent': 'axios/1.7.5',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    responseType: 'stream',
    method: 'get',
    url: 'https://registry.npmjs.org/@koishijs/boilerplate/-/boilerplate-0.0.0-40de9c58105d44098dd4a031c762940ea7319851.tgz',
    data: undefined
  },
  request: <ref *1> Writable {
    _events: {
      close: undefined,
      error: [Function: handleRequestError],
      prefinish: undefined,
      finish: undefined,
      drain: undefined,
      response: [Function: handleResponse],
      socket: [Function: handleRequestSocket]
    },
    _writableState: WritableState {
      highWaterMark: 16384,
      length: 0,
      corked: 0,
      onwrite: [Function: bound onwrite],
      writelen: 0,
      bufferedIndex: 0,
      pendingcb: 0,
      [Symbol(kState)]: 17580812,
      [Symbol(kBufferedValue)]: null
    },
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'https:',
      path: '/@koishijs/boilerplate/-/boilerplate-0.0.0-40de9c58105d44098dd4a031c762940ea7319851.tgz',
      method: 'GET',
      headers: [Object: null prototype],
      agents: [Object],
      auth: undefined,
      family: undefined,
      beforeRedirect: [Function: dispatchBeforeRedirect],
      beforeRedirects: [Object],
      hostname: 'registry.npmjs.org',
      port: '',
      agent: undefined,
      nativeProtocols: [Object],
      pathname: '/@koishijs/boilerplate/-/boilerplate-0.0.0-40de9c58105d44098dd4a031c762940ea7319851.tgz'
    },
    _ended: true,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 0,
    _requestBodyBuffers: [],
    _eventsCount: 3,
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: true,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /@koishijs/boilerplate/-/boilerplate-0.0.0-40de9c58105d44098dd4a031c762940ea7319851.tgz HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'User-Agent: axios/1.7.5\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: registry.npmjs.org\r\n' +
        'Connection: keep-alive\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/@koishijs/boilerplate/-/boilerplate-0.0.0-40de9c58105d44098dd4a031c762940ea7319851.tgz',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: [Function: emitRequestTimeout],
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'registry.npmjs.org',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(shapeMode)]: false,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    _currentUrl: 'https://registry.npmjs.org/@koishijs/boilerplate/-/boilerplate-0.0.0-40de9c58105d44098dd4a031c762940ea7319851.tgz',
    [Symbol(shapeMode)]: true,
    [Symbol(kCapture)]: false
  },
  cause: Error: read ECONNRESET
      at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
    errno: -4077,
    code: 'ECONNRESET',
    syscall: 'read'
  }
}
Done in 85.10s.
1 个赞

是网络问题

1 个赞