api-platform / create-client

Generate React or Vue.js-based Progressive Web Apps from an Hydra-enabled API. Also support React Native.
https://api-platform.com/docs/client-generator/
MIT License
373 stars 132 forks source link

Local client generation - SSL error #373

Closed upandfine closed 7 months ago

upandfine commented 1 year ago

API Platform version(s) affected: x.y.z "api-platform/core": "^3.2@beta",

Description
{ api: Api { entrypoint: 'http://localhost', resources: [] }, error: TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11600:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { cause: Error: unable to get local issuer certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1659:34) at TLSSocket.emit (node:events:514:28) at TLSSocket._finishInit (node:_tls_wrap:1070:8) at ssl.onhandshakedone (node:_tls_wrap:856:12) { code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY' } }, response: undefined, status: undefined }

How to reproduce
npm init @api-platform/client http://localhost/ src/ -- --generator vue --resource question (question exists)

Possible Solution
?

Additional Context
Is there a way to generate the client locally without SSL? I find the diversions via a live system with SSL or the local SSL generation very cumbersome and frustrating.

calls9-tylersmith commented 10 months ago
NODE_TLS_REJECT_UNAUTHORIZED=
0 npm init @api-platform/client http://localhost/ src/ -- --generator vue --resource question