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
  • #1240
Closed
Open
Issue created Dec 11, 2016 by Administrator@rootContributor

Using react-scripts from parent folder results in strange behaviour

Created by: ashtonsix

Background

I'm building a library with several examples, these examples use create-react-app but I don't want people to waste lots of time by repeatedly installing react-scripts. So I moved the react-scripts dependency to the project root.

Steps to reproduce

Run the following inside an empty folder:

npm install -g create-react-app@1.0.2
npm install --save react@15.4.0 react-dom@15.4.0
npm install --save-dev react-scripts@0.8.3
mkdir examples
cd examples
create-react-app counter
cd counter
npm uninstall --save react react-dom
npm uninstall --save-dev react-scripts
npm start

Navigate to localhost:3000 and you might see something like:

issue

Which can be fixed by moving examples/counter/public/index.html to examples/counter/index.html (though some additional errors are reported in the console like URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico').

This seems like behavior from an older version of react-scripts but I'm not sure.

Environment

node -v # 6.2.0
npm -v  # 3.10.5
# Windows 7
# Chrome 54
Assignee
Assign to
Time tracking