-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Relations hasMany bug. #2709
Comments
removed nodes modules and reinstalled with npm... too many broken dependencies for it to run
|
Hi, why your Meteor app is located into MAMP? |
Closing because it's more an issue in your app than a bug but we can keep discussing |
@eric-burel AlbumSchema.js
GenresSchema.js
My PROJECTS are in MAMP folder cos I used to develop LAMP and never bothered to relocate my projects on my computer when I started MERN. Also I have Fragments defined.
As you can see I have the collections defined |
@eric-burel beat my head on this all night. I have attached the repo if you want to take a peek. https://github.com/webface/vulcan-logic I tried to follow patterns in https://github.com/SachaG/SidebarVulcan/blob/master/packages/sidebar2020/lib/modules/posts/schema.js for lack of better examples but no dice. |
I I can't run it, I am not on mly Linux, but can you try reverse the lines here: https://github1s.com/webface/vulcan-logic/blob/HEAD/packages/music-site/lib/modules/index.js? |
@eric-burel I tried that
now I just get a consistent error but the crashing stopped
|
Seems like an empty document or whatever, you need to dig that but it seems that the graphql API built ok. |
Could be something missing on the server setup. Here is the console.log from localhost:3000/albums
|
Yes you have server/client discrepancies but I cannot tell which just from this log, you need to check the server terminal |
Also the errors are only thrown on the /albums route. getting warm
|
turns out
|
Describe the bug
After completing the get started tutorial, I decided to build a more involved example where I have a collection related to another collection. I created an Albums and a Genres Schema. I can crud the albums till I try to define the related field then the collection it cant find genres of undefined.
genresIds: makeAutocomplete(
{
type: Array,
arrayItem: {
type: String,
optional: true,
},
label: "Genres",
optional: true,
canCreate: ["members"],
canUpdate: ["owners", "admins"],
canRead: ["guests"],
relation: {
fieldName: "genresIds",
typeName: "[Genre]",
kind: "hasMany",
},
order: 5,
description: "You can pick up to three genres.",
},
{ autocompletePropertyName: "name" }
),
Error: Could not find collection for type "Genre". Registered types: User, Email, Setting, Callback
at getCollectionByTypeName (packages/vulcan:lib/lib/modules/collections.js:42:11)
at getQueryResolverName (packages/vulcan:core/lib/modules/decorators/autocomplete.js:8:24)
at makeAutocomplete (packages/vulcan:core/lib/modules/decorators/autocomplete.js:34:58)
at module (packages/music-site/lib/modules/albums/schema.js:81:14)
```
removed node modules and reinstall and have to install bcrypt...now vulcan crashes and wont run anymore
Mac OSX Big Sur
Node 14
Meteor 2.1
The text was updated successfully, but these errors were encountered: