Giter Club home page Giter Club logo

Comments (7)

mvandervliet avatar mvandervliet commented on July 17, 2024 1

This may be a problem of having util or auxiliary files within the components directory that's scanned by the registry? For example, if ComponentFirstVisitVerification.ts does not export a valid component implementation, then this error might be thrown. To solve it, just move such classes/functions into a different directory. If that doesn't work, maybe share some snippets that can reproduce the problem.

from bots-node-sdk.

mvandervliet avatar mvandervliet commented on July 17, 2024 1

Are you able to share the contents of ComponentFirstVisitVerification.ts and any of the static methods or constructor logic that causes the error?

from bots-node-sdk.

chrisk68 avatar chrisk68 commented on July 17, 2024

from bots-node-sdk.

LuizPiresS avatar LuizPiresS commented on July 17, 2024

There are no spaces.

The .js files are generated by the compiler.
And the error only occurs when I instantiate a class (var test = new ClassName) or use a static method (ClassName.staticMethodName) from the other classes I developed to make the logic separate from component calls.

There are no errors in the code so much that it compiles without problems the component just does not pass the sdk test and thus does not go up the service.

I am developing a POC for a large client in Brazil.

Thanks

from bots-node-sdk.

LuizPiresS avatar LuizPiresS commented on July 17, 2024

Below is the tree of the project's directories I believe that in this point everything is right.
But I will identify exactly where this problem is since the project is still small

├── Dockerfile
├── README.md
├── build
| ├── components
| | ├── ComponentFirstVisitVerification.js
| | └── helloWorld.js
| ├── database
| | ├── index.js
| | └── models
| | └── User.js
| ├── database.js
| ├── domain
| | ├── first-visit-verification
| | | └── FirstVisitVerification.js
| | └── logs
| | ├── @types
| | └── errors
| ├── main.js
| ├── responses
| | └── index.js
| └── spec
| └── helloWorld.test.js
├── dialog-flow
| └── dialog-flow.yml
├── docker-compose.yml
├── jest-integration-config.js
├── jest-unit-config.js
├── jest.config.js
├── my-component-service-1.0.0.tgz
├── package-lock.json
├── package.json
├── src
| ├── components
| | ├── ComponentFirstVisitVerification.ts
| | └── helloWorld.ts
| ├── database
| | ├── index.ts
| | └── models
| | └── User.ts
| ├── database.ts
| ├── domain
| | ├── errors
| | ├── first-visit-verification
| | | └── FirstVisitVerification.ts
| | └── logs
| | ├── @types
| | └── errors
| ├── main.ts
| ├── responses
| | └── index.ts
| └── spec
| ├── helloWorld.test.ts
| ├── test.cc.req.json
| └── test.eh.req.json
└── tsconfig.json

from bots-node-sdk.

LuizPiresS avatar LuizPiresS commented on July 17, 2024

Good Morning!

I managed to isolate the error. :)
The error happens in classes that have mangoose calls in their methods.
Today I will refactor to see if it is an error in the mangoose itself or if the error occurs in other frameworks.
But in any case, I will report the evolution here.

Thanks

from bots-node-sdk.

LuizPiresS avatar LuizPiresS commented on July 17, 2024

I believe that I managed to "solve" the problem. The error is not quite an error what happens is that the component validation is abstracting the real error, passing a generic message to the console

from bots-node-sdk.

Related Issues (6)

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.