Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1649
Closed
Open
Issue created Feb 26, 2017 by Administrator@rootContributor

Spaces in project names are not handled properly

Created by: wojtekmaj

Description

create-react-app allows you to create an app with spaces (and uppercase letters). Simply fire create-react-app "Example project" and it will be created! This, however, creates some issues stated below.

Expected behavior

  • create-react-app should disallow creating apps with spaces and uppercase letters

OR

  • create-react-app should detect if there are spaces/uppercase letters in project name provided by the user and:
    • Success message after creating an app should wrap project name in quotes if necessary
    • Project name in package.json should have spaces changed to dashes to avoid npm error

Actual behavior

After the app is created using the command above, a help message is displayed suggesting to go to the folder created by create-react app (sorry, don't remember it word-by word):

> App created successfully (...)
> Run the following command:
> cd **{project_name_here}**

Obviously, running command like cd ./My project won't work (we need to use command like cd "./My project").

Furthermore, running the app fails as the name containing spaces is also inserted into package.json file, and npm throws an error.

Assignee
Assign to
Time tracking