starter icon indicating copy to clipboard operation
starter copied to clipboard

set proxy for mintlify

Open hardcore opened this issue 10 months ago • 6 comments

Hi there,

I tryed just to start minlify dev and got an error:

✖ Running mintlify dev afer updating requires an internet connection.

I'm running it on linux and did some proxy things like:

export HTTP_PROXY=http://myproxy:3128
export HTTPS_PROXY=http://myproxy:3128
npm config set proxy http://myproxy:3128
npm config set https-proxy http://myproxy:3128

Where can I set a proxy for mintlify?

Thanks a lot hc

hardcore avatar Jan 22 '25 09:01 hardcore

Any suggestions?

hardcore avatar Jan 27 '25 08:01 hardcore

same error

$ mintlify dev

⠋ Downloading Mintlify framework...Usage: mintlify dev [options]

选项: --open Open 🌿 Mintlify in the browser [布尔] [默认值: true] -h, --help 显示帮助信息 [布尔] -v, --version 显示版本号 [布尔]

示例: mintlify dev Run with default settings (opens in browser) mintlify dev --no-open Run without opening in browser

RequestError: read ECONNRESET at ClientRequest. (file:///Users/ims/Library/Caches/pnpm/dlx/ynaw72nihiblbkc3ghrirzzi64/1958a641cf4-14f4f/node_modules/.pnpm/[email protected]/node_modules/got/dist/source/core/index.js:792:107) at Object.onceWrapper (node:events:632:26) at ClientRequest.emit (node:events:529:35) at TLSSocket.socketErrorListener (node:_http_client:501:9) at TLSSocket.emit (node:events:517:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) { input: undefined, code: 'ECONNRESET', timings: { start: 1741783888710, socket: 1741783888711, lookup: 1741783888925, connect: 1741783889236, secureConnect: undefined, upload: undefined, response: undefined, end: undefined, error: 1741783889272, abort: undefined, phases: { wait: 1, dns: 214, tcp: 311, tls: undefined, request: undefined, firstByte: undefined, download: undefined, total: 562 } }, options: { request: undefined, agent: { http: undefined, https: undefined, http2: undefined }, h2session: undefined, decompress: true, timeout: { connect: undefined, lookup: undefined, read: undefined, request: undefined, response: undefined, secureConnect: undefined, send: undefined, socket: undefined }, prefixUrl: '', body: undefined, form: undefined, json: undefined, cookieJar: undefined, ignoreInvalidCookies: false, searchParams: undefined, dnsLookup: undefined, dnsCache: undefined, context: {}, hooks: { init: [], beforeRequest: [], beforeError: [], beforeRedirect: [], beforeRetry: [], afterResponse: [] }, followRedirect: true, maxRedirects: 10, cache: undefined, throwHttpErrors: true, username: '', password: '', http2: false, allowGetBody: false, headers: { 'user-agent': 'got (https://github.com/sindresorhus/got)', 'accept-encoding': 'gzip, deflate, br' }, methodRewriting: false, dnsLookupIpVersion: undefined, parseJson: [Function: parse], stringifyJson: [Function: stringify], retry: { limit: 2, methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ], statusCodes: [ 408, 413, 429, 500, 502, 503, 504, 521, 522, 524 ], errorCodes: [ 'ETIMEDOUT', 'ECONNRESET', 'EADDRINUSE', 'ECONNREFUSED', 'EPIPE', 'ENOTFOUND', 'ENETUNREACH', 'EAI_AGAIN' ], maxRetryAfter: undefined, calculateDelay: [Function: calculateDelay], backoffLimit: Infinity, noise: 100 }, localAddress: undefined, method: 'GET', createConnection: undefined, cacheOptions: { shared: undefined, cacheHeuristic: undefined, immutableMinTimeToLive: undefined, ignoreCargoCult: undefined }, https: { alpnProtocols: undefined, rejectUnauthorized: undefined, checkServerIdentity: undefined, certificateAuthority: undefined, key: undefined, certificate: undefined, passphrase: undefined, pfx: undefined, ciphers: undefined, honorCipherOrder: undefined, minVersion: undefined, maxVersion: undefined, signatureAlgorithms: undefined, tlsSessionLifetime: undefined, dhparam: undefined, ecdhCurve: undefined, certificateRevocationLists: undefined }, encoding: undefined, resolveBodyOnly: false, isStream: true, responseType: 'text', url: URL { href: 'https://mint-releases.b-cdn.net/mint-0.0.992.tar.gz', origin: 'https://mint-releases.b-cdn.net', protocol: 'https:', username: '', password: '', host: 'mint-releases.b-cdn.net', hostname: 'mint-releases.b-cdn.net', port: '', pathname: '/mint-0.0.992.tar.gz', search: '', searchParams: URLSearchParams {}, hash: '' }, pagination: { transform: [Function: transform], paginate: [Function: paginate], filter: [Function: filter], shouldContinue: [Function: shouldContinue], countLimit: Infinity, backoff: 0, requestLimit: 10000, stackAllItems: false }, setHost: true, maxHeaderSize: undefined, signal: undefined, enableUnixSockets: false } }

feliming avatar Mar 12 '25 12:03 feliming

Problem
The URL https://mint-releases.b-cdn.net/mint-${TARGET_MINT_VERSION.slice(1)}.tar.gz cannot be accessed.

Solution:
On Linux, you can resolve this issue by following these steps:

  1. Manually download the file from https://mint-releases.b-cdn.net/mint-${TARGET_MINT_VERSION.slice(1)}.tar.gz and save it to /root/.mintlify/mint.tar.gz.

    wget -c https://mint-releases.b-cdn.net/mint-0.0.1009.tar.gz -O /root/.mintlify/mint.tar.gz
    
  2. Comment out the download code in the file /root/.nvm/versions/node/v22.11.0/lib/node_modules/mintlify/node_modules/@mintlify/previewing/dist/local-preview/index.js.

    // yield pipeline(got.stream(TAR_URL), fse.createWriteStream(TAR_PATH));
    

Jason-cs18 avatar Mar 18 '25 09:03 Jason-cs18

@hardcore @feliming

Jason-cs18 avatar Mar 18 '25 10:03 Jason-cs18

How to solve this problem on Windows system?Where should I put the tar file?

TangTang25 avatar Apr 16 '25 01:04 TangTang25

在 Windows 系统上如何解决这个问题?我应该把 tar 文件放在哪里?

Oh, I've solved it.

TangTang25 avatar Apr 16 '25 02:04 TangTang25