Prompt the user if it is not currently a valid node project
wChenonly opened this issue · comments
wChenonly commented
Clear and concise description of the problem
Now if you run in an arbitrary empty folder, executing ni will report an error that is not friendly, and executing other will not receive feedback. not very friendly
Suggested solution
In the runCli method, first determine whether there is package.json file, and if so, continue.
If not, prompt the user that this directory is not a valid project.
Or prompt the user if you want to create a new project, we execute. npm init
I can add this if I can.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Anthony Fu commented