Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Expected to find a symbol error when creating an API #2827

Open
Draykee opened this issue May 2, 2024 · 4 comments
Open

cli: Expected to find a symbol error when creating an API #2827

Draykee opened this issue May 2, 2024 · 4 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@Draykee
Copy link
Contributor

Draykee commented May 2, 2024

Describe the bug
I get an error trying to create an API:
image

To Reproduce
Steps to reproduce the behavior:

  1. Create Plugin
  2. Create Entity (Translatable)
  3. Create Service (CRUD)
  4. Create API

I'm using vendure v2.2.2 (also CLI) and "@vendure-plus/advanced-search-plugin": "1.6.0"

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • @vendure/core version: 2.2.3
  • @vendure/cli version: 2.2.3
  • Nodejs version: v18.19.0
  • Database (mysql/postgres etc): postgres 16

Additional context
I have many other plugins and dependencies, but most of them align exactly with the ones used by vendure.

@Draykee Draykee added the type: bug 🐛 Something isn't working label May 2, 2024
@michaelbromley
Copy link
Member

Hi,
I just repeated the steps on a clean v2.2.3 install and could not reproduce:

┌  ✨ Let's add a new feature to your Vendure project!
│
◇  Which feature would you like to add?
│  [Plugin] Create a new Vendure plugin
┌  Adding a new Vendure plugin!
│
◇  Project analyzed
│
◇  What is the name of the plugin?
│  test1
│
◇  Plugin location
│  C:\Development\temp\vendure-223\src\plugins\my-new-feature\test1
│
◇  Generated plugin scaffold
│
◇  Updated VendureConfig
│
◇  Add features to test1?
│  [Plugin: Entity] Add a new entity to a plugin
│
◇  What is the name of the custom entity?
│  Test
│
◇  Entity features (use ↑, ↓, space to select)
│  Custom fields, Translatable
│
◇  Entity created
│
◇  Add features to test1?
│  [Plugin: Service] Add a new service to a plugin
│
◇  What type of service would you like to add?
│  Service to perform CRUD operations on an entity
│
◇  Select an entity
│  Test
│
◇  TestService created
│
◇  Add features to test1?
│  [Plugin: API] Adds GraphQL API extensions to a plugin
│
◇  Which service contains the business logic for this API extension?
│  TestService: (CRUD service for Test)
│
◇  API extensions added
│
◆  Add features to test1?
│  ● [Finish] No, I'm done!
│  ○ [Plugin: Entity] Add a new entity to a plugin
│  ○ [Plugin: Service] Add a new service to a plugin
│  ○ [Plugin: API] Adds GraphQL API extensions to a plugin
│  ○ [Plugin: Job Queue] Defines an new job queue on a service
│  ○ [Plugin: UI] Set up Admin UI extensions
│  ○ [Project: Codegen] Set up GraphQL code generation

Are you performing all 4 steps in 1 single CLI session? And can you confirm which version you are on - you mentioned both v2.2.2 and v2.2.3 above.

@Draykee
Copy link
Contributor Author

Draykee commented May 3, 2024

I'm using v2.2.3 and I did it in multiple session, to already add properties to the entity.
I assume the CLI can't find the service:

image

@Draykee
Copy link
Contributor Author

Draykee commented May 3, 2024

image

@michaelbromley
Copy link
Member

Did you make any changes to the service before attempting to create the API?

If you are able to reproduce this from a clean install, please tell me the exact steps to reproduce. I'm lacking a bit of information currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants