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
  • Merge requests
  • !1122

add support for installing react-scripts using npm link

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/tabrezm/master into master Nov 30, 2016
  • Overview 9
  • Commits 3
  • Pipelines 0
  • Changes 1

Created by: tabrezm

When using npm link to depend on a forked version of react-scripts, the paths are set up incorrectly such that the source files in the react-scripts template get used instead of the actual source files from the app.

Repro steps:

  1. Create a package using the public version of create-react-app.
  2. Clone create-react-app from GitHub and convert packages/react-scripts to a scoped package. For example, change this:
  "name": "react-scripts",
  "version": "0.7.0",

to this:

  "name": "@tabrezm/react-scripts",
  "version": "0.0.0",
  1. Run npm link from packages/react-scripts.
  2. Run npm link @tabrezm/react-scripts from the folder for the package created in step 1. Also, change the following lines in package.json from this:
  "devDependencies": {
    "react-scripts": "0.7.0"
  },

to this

  "devDependencies": {
    "@tabrezm/react-scripts": "0.0.0"
  },
  1. Change something in App.js and run npm start.

Expected: see new content Actual: see content from template in react-scripts instead

Full discussion: https://github.com/facebookincubator/create-react-app/issues/682#issuecomment-263500172

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tabrezm/master