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
  • #6282
Closed
Open
Issue created Jan 26, 2019 by Administrator@rootContributor

Opaque error for invalid CSS after upgrade: TypeError: Cannot read property '0' of undefined

Created by: buildbreakdo

After upgrading from react-scripts 1.1.4 to 2.1.3 see an opaque error message when trying to build:

Error in   TypeError: Cannot read property '0' of undefined

Thought this might be related to #2069 (closed) (determined to be bug of package managers?), but after trial and error determined it was related to invalid CSS.

Reproduce (react-scripts 2.1.3):

  1. Add invalid CSS to any .css file, like:
label[for=*] {
  margin-right: 12px;
}
  1. yarn build

Output:

Error in   TypeError: Cannot read property '0' of undefined

This invalid CSS does not produce a build error in react-scripts 1.1.4, so this is something people will bump into when they upgrade and not really know what to do (e.g., claim the upgraded version is broken).

Assignee
Assign to
Time tracking