Git Product home page Git Product logo

Comments (7)

luca-nardelli avatar luca-nardelli commented on July 29, 2024 3

Checking the stacktrace:

at Object.<anonymous> (/home/luca/.nvm/versions/node/v11.10.0/lib/node_modules/@api-platform/client-generator/node_modules/@api-platform/api-doc-parser/lib/swagger/handleJson.js:48:15)

I went to api-doc-parser: https://github.com/api-platform/api-doc-parser/blob/master/src/swagger/handleJson.js

Here it imports lodash, so probably the issue is there?

from api-doc-parser.

luca-nardelli avatar luca-nardelli commented on July 29, 2024 2

Yeah I'll do that!

from api-doc-parser.

luca-nardelli avatar luca-nardelli commented on July 29, 2024 2

Opened the PR: #51

I had to add lodash.uniq as a dependency and also change how the two functions were imported, since lodash is not listed in the package.json

from api-doc-parser.

dunglas avatar dunglas commented on July 29, 2024

It’s weird because lodash isn’t used in the command (it is only in the generated code).

from api-doc-parser.

dunglas avatar dunglas commented on July 29, 2024

I can confirm that this bug occurs time to time when using Docker. Rebuilding the Docker container fixed the issue in my case. It needs more investigation, but it's probably not directly related to this repository.

from api-doc-parser.

luca-nardelli avatar luca-nardelli commented on July 29, 2024

In my case, it happened on my pc (without being in a docker container), and it seemed to always happen unless I had globally installed lodash by myself.

Sorry if this seems a repetition of what I wrote above, but I didn't understand if you excluded the issue being in api-doc-parser or not, so I'll rephrase what I wrote.

The error trace I printed above points to the handleJson.js in api-doc-parser.

Line 1 is
import { get, uniq } from "lodash";

However, in the package.json only lodash.get is listed as a dependency. Can this be related?

from api-doc-parser.

dunglas avatar dunglas commented on July 29, 2024

Good catch thanks for investigating! lodash.uniq must be added to api-doc-parser's package.json! Would you mind to open a Pull Request? (I move this issue to the appropriate repository).

from api-doc-parser.

Related Issues (20)

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.