Code Monkey home page Code Monkey logo

create-react-app-redoc's People

Contributors

dependabot[bot] avatar marshevskyy avatar pryabov avatar redshoga avatar romanhotsiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

create-react-app-redoc's Issues

How do I add support for a local file?

When I replace the specUrl value with the location of a local yaml file (in the same folder) and run the app, the Loading page appears with an infinite spinner.

<RedocStandalone specUrl="https://redocly.github.io/redoc/openapi.yaml" />
replaced with
<RedocStandalone specUrl="openapi.yaml" />

Not working with react-scripts 5.0.0

I tried to run this project with react-scripts 5.0.0 and encountered the issues below, but it works fine with 4.0.3.
(could you please support this version of react-scripts ๐Ÿ™)

Compiled with problems:X

ERROR in ./node_modules/@redocly/openapi-core/lib/config/config.js 10:13-28

Module not found: Error: Can't resolve 'path' in '.../node_modules/@redocly/openapi-core/lib/config'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
	- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "path": false }


ERROR in ./node_modules/@redocly/openapi-core/lib/redocly/index.js 42:15-30

Module not found: Error: Can't resolve 'path' in '.../node_modules/@redocly/openapi-core/lib/redocly'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
	- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "path": false }


etc...

Failed to compile ./node_modules/redoc/bundles/redoc.lib.js Module not found: Can't resolve 'core-js/es/promise' in

Hi @RomanHotsiy ,

I'm having the following problem:
Failed to compile ./node_modules/redoc/bundles/redoc.lib.js Module not found: Can't resolve 'core-js / es / promise' in

I cloned the project, I installed the modules from npm, I changed the original project's url because it pointed to a page with the following:
https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml

But it does not work.

specUrl => local file

When I try to add my .yaml file I get an error

"http://localhost:3000/openapi.yaml" is not a valid JSON Schema

If I put it to the root or public/
How can reference specUrl to a local file ?

Not compatible with react-scripts 5.0.0

The tutorials and this template app do not build or start with the latest redoc and react-scripts versions due to many errors about polyfills for node.js core modules, all coming from redoc code

This does not work:

  "dependencies": {
    "core-js": "^3.21.1",
    "mobx": "^6.5.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "redoc": "^2.0.0-rc.66",
    "styled-components": "^5.3.5"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build"
  },
  "devDependencies": {
    "react-scripts": "^5.0.0"
  }

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

Keeping everything the same, but downgrading react-scripts, makes it work again.

  "devDependencies": {
    "react-scripts": "4.0.3"
  }

react-scripts hides webpack configurations, so we cannot provide fallbacks as suggested. This was previously mentioned as being fixed a couple months ago, but I have been stuck on this error for 2 days until I figured out the downgrade workaround.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.