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
  • #3349
Closed
Open
Issue created Oct 29, 2017 by Administrator@rootContributor

react-scripts/init: Template dependencies ignored

Created by: callummr

Is this a bug report?

I think so

Can you also reproduce the problem with npm 4.x?

N/A

Which terms did you search for in User Guide?

"template dependencies"

Environment

  1. node -v: 8.8.1
  2. npm -v: 5.4.2
  3. yarn --version (if you use Yarn): 1.2.1
  4. npm ls react-scripts (if you haven’t ejected): 1.0.14

Then, specify:

  1. Operating system: High Sierra
  2. Browser and version (if relevant): N/A

Steps to Reproduce

  1. Fork create-react-app
  2. Add a .template.dependencies.json to packages/react-scripts/template containing a dependencies object with at least one dependency
  3. Run yarn create-react-app test

Expected Behavior

Template dependencies are installed in the created 'test' app

Actual Behavior

Since react and react-dom are now installed by create-react-app and not react-scripts/init, the check to execute the dependency installation https://github.com/facebookincubator/create-react-app/blob/345f5508610a96e720b91785b49c7a934bbc477b/packages/react-scripts/scripts/init.js#L122 fails and template dependencies are ignored. I believe there needs to be a separate check in case any template dependencies do exist, to then install them. Happy to PR if agreed this is incorrect behaviour 😊

Cheers!

Assignee
Assign to
Time tracking