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

Found no files with valid type definitions #66

Closed
koredefashokun opened this issue May 24, 2020 · 2 comments
Closed

Found no files with valid type definitions #66

koredefashokun opened this issue May 24, 2020 · 2 comments
Labels
question Further information is requested

Comments

@koredefashokun
Copy link

koredefashokun commented May 24, 2020

I get this error when I try to start a server, using SQLMancer.

Error: Found no files with valid type definitions using glob pattern "/Users/korede/Overt/Market/server/src/schema.ts"
    at Object.createSqlmancerClient (/Users/korede/Overt/Market/server/node_modules/sqlmancer/src/client/createSqlmancerClient.ts:46:11)
    at Object.<anonymous> (/Users/korede/Overt/Market/server/src/database.ts:10:23)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Module.m._compile (/Users/korede/Overt/Market/server/node_modules/ts-node/src/index.ts:858:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/korede/Overt/Market/server/node_modules/ts-node/src/index.ts:861:12)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)

Here's a link to the code. This might not be an issue, but I'm not sure what I'm missing, since I followed the example. Any help is appreciated.

@danielrearden
Copy link
Owner

There's a missing semicolon here:

store: Store! @relate(on: [{ from "store_id", to: "id" }])
                                 ^

and an extraneous curly bracket here:

user: User! @relate(on: [{ from: "user_id", to: "id" }]})
                                                       ^

It would be helpful if the error message distinguished between "we didn't mind any type definitions" and "we found found type definitions but there were issues with them". I'd be even more helpful if the error message spelled out what was wrong with the type definitions. I opened #67 to track that fix.

Please let me know if you have any other questions or hit any other obstacles!

@danielrearden danielrearden added the question Further information is requested label May 24, 2020
@koredefashokun
Copy link
Author

Thanks @danielrearden. Really appreciate this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants