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

Context error message #373

Closed
paulmars opened this issue Apr 1, 2020 · 3 comments
Closed

Context error message #373

paulmars opened this issue Apr 1, 2020 · 3 comments

Comments

@paulmars
Copy link

paulmars commented Apr 1, 2020

yarn rw g scaffold post

causes

Cannot create property 'context' on string 'No schema definition found forPost'

unclear what a property context is on a string in this case. this happens if schema isn't set. just think the message could be more clear.

@thedavidprice
Copy link
Contributor

🤔Good point... I have no idea what that means.

@cannikin Any suggestions here to improve error message?

@cannikin
Copy link
Member

cannikin commented Apr 1, 2020

@thedavidprice As per our conversation, here's me throwing the "No schema definition" error: https://github.com/redwoodjs/redwood/blob/master/packages/cli/src/lib/index.js#L43

My guess is you need to do something special for Listr besides just throwing an error.

Maybe we can just:

throw new Error(`No schema definition found for \`${name}\``)

@thedavidprice
Copy link
Contributor

this was closed in #401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants