Giter Site home page Giter Site logo

fredx87 / openapi-mock-generator Goto Github PK

View Code? Open in Web Editor NEW
84.0 84.0 4.0 8.64 MB

Progressive Web App for generating mocked data from an OpenAPI specification

Home Page: https://fredx87.github.io/openapi-mock-generator

License: MIT License

JavaScript 0.80% TypeScript 98.68% HTML 0.32% CSS 0.19%
generator mock oas3 openapi swagger

openapi-mock-generator's People

Contributors

fredx87 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  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  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

openapi-mock-generator's Issues

Cannot build/start in docker

Hi.

I've tried to run this in docker image based on node:12.18 and node:latest -

FROM node:latest
ENV NODE_OPTIONS="--max-old-space-size=2048"
ENV NODE_OPTIONS="--max_old_space_size=2048"
WORKDIR /usr/src/app
RUN npm i openapi-mock-generator@>=1.0.0
WORKDIR /usr/src/app/node_modules/openapi-mock-generator
RUN npm i
RUN echo "SKIP_PREFLIGHT_CHECK=true" > .env
EXPOSE 3000
RUN NODE_OPTIONS="--max_old_space_size=2048"
CMD [ "tail", "-f", "/dev/null" ]

After docker buid and docker run I'd open inner docker CLI and use npm run-script start, but everything crashes:
I saw this in console and browser window:

Failed to compile.

/usr/src/app/node_modules/openapi-mock-generator/src/features/document/DocumentTree.tsx
TypeScript error in /usr/src/app/node_modules/openapi-mock-generator/src/features/document/DocumentTree.tsx(48,9):
Type 'ReactNode[]' is not assignable to type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>[] | ... 7 more ... | undefined'.
  Type 'ReactNode[]' is not assignable to type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>[]'.
    Type 'ReactNode' is not assignable to type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>'.
      Type 'undefined' is not assignable to type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>'.  TS2322

    46 |     return (
    47 |       <TreeNode selectable={false} key={node.ref} title={title}>
  > 48 |         {node.children.map(child => renderNode(child, searchTerm))}
       |         ^
    49 |       </TreeNode>
    50 |     );
    51 |   }

Then I've tried npm run-script build with similar result:

> [email protected] build /usr/src/app/node_modules/openapi-mock-generator
> react-app-rewired build

Creating an optimized production build...
Failed to compile.

Failed to minify the bundle. Error: static/js/2.f457e00a.chunk.js from Terser
Error: Call retries were exceeded
    at /usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/scripts/build.js:196:23
    at finalCallback (/usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compiler.js:257:39)
    at /usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compiler.js:273:13
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/Hook.js:154:20)
    at onCompiled (/usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compiler.js:271:21)
    at /usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compiler.js:681:15
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/Hook.js:154:20)
    at /usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compiler.js:678:31
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/Hook.js:154:20)
    at /usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:1423:35
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/src/app/node_modules/openapi-mock-generator/node_modules/tapable/lib/Hook.js:154:20)
    at /usr/src/app/node_modules/openapi-mock-generator/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:1414:32
Read more here: https://bit.ly/CRA-build-minify

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-app-rewired build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-28T04_40_34_232Z-debug.log

I read the https://create-react-app.dev/docs/troubleshooting/#npm-run-build-fails-to-minify article but react-scripts in package.json is "react-scripts": "^3.4.1". Where is my mistake? My goal is running copy of openapi-mock-generator as webpage

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.