You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PROBLEM
During the new creation of a react-slingshot based project, on run of setup script, the console prompts input of a project description. Currently, if the user provides double-quotes somewhere within this step of the process and then continues to complete setup; upon initial run of start script, an error occurs causing start to fail. The console's error output does not provide immediately obvious reason for failure, something newcomer's to node/react in particular will find difficult to debug. React-slingshot is a well-known, widely utilized boilerplate; which makes it's appeal as a learning tool for newcomers to node/react all that more relevant to the context of this problem.
SOLUTION
The issue is based around improperly formatted string output for valid JSON (package.json), and not improper format related to valid package.json value entry (i.e. uppercased project names). As such, it makes sense that the solution to the problem be the responsibility of the setup script itself and not that of the user. Rather than provide the user with an error message explaining how to use double quotes, instead have the input value at this step of the setup process normalized via an internal validation utility method/function which is run within setup.
ALTERNATIVES
Upon invalid input at this step of the setup process, provide the user with an error message that tells the user to re-enter the project description and instructs them on how to properly escape characters for valid JSON output. See SOLUTION to find argument against this alternative.
The text was updated successfully, but these errors were encountered:
DaneTheory
changed the title
Improve run of setup script with normalized string output for package.json
FEATURE REQUEST: Improve run of setup script with normalized string output for package.json
Jan 13, 2019
DaneTheory
changed the title
FEATURE REQUEST: Improve run of setup script with normalized string output for package.json
Feature Request: Improve run of setup script with normalized string output for package.json
Jan 13, 2019
m10
linked a pull request
Oct 24, 2020
that will
close
this issue
PROBLEM
During the new creation of a react-slingshot based project, on run of setup script, the console prompts input of a project description. Currently, if the user provides double-quotes somewhere within this step of the process and then continues to complete setup; upon initial run of start script, an error occurs causing start to fail. The console's error output does not provide immediately obvious reason for failure, something newcomer's to node/react in particular will find difficult to debug. React-slingshot is a well-known, widely utilized boilerplate; which makes it's appeal as a learning tool for newcomers to node/react all that more relevant to the context of this problem.
SOLUTION
The issue is based around improperly formatted string output for valid JSON (package.json), and not improper format related to valid package.json value entry (i.e. uppercased project names). As such, it makes sense that the solution to the problem be the responsibility of the setup script itself and not that of the user. Rather than provide the user with an error message explaining how to use double quotes, instead have the input value at this step of the setup process normalized via an internal validation utility method/function which is run within setup.
ALTERNATIVES
Upon invalid input at this step of the setup process, provide the user with an error message that tells the user to re-enter the project description and instructs them on how to properly escape characters for valid JSON output. See SOLUTION to find argument against this alternative.
The text was updated successfully, but these errors were encountered: