Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !9244

Explain how to uninstall create-react-app globally

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Nick McCurdy requested to merge github/fork/nickmccurdy/explain-how-to-uninstall-create-react-app-globally into master 5 years ago
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 4

I've noticed a few times that users will read the error about having to uninstall create-react-app, not know how to do that, and then get stuck and have to ask for help. This adds uninstallation advice (similar to what's in the readme) at the bottom of the error messages, and also includes yarn.

Compare
  • master (base)

and
  • latest version
    43a2961c
    2 commits, 2 years ago

4 files
+ 11
- 4

    Preferences

    File browser
    Compare changes
docusau‎rus/docs‎
adding-typ‎escript.md‎ +2 -2
getting-s‎tarted.md‎ +1 -1
packages/react-‎scripts/scripts‎
ini‎t.js‎ +7 -0
READ‎ME.md‎ +1 -1
docusaurus/docs/adding-typescript.md
+ 2
- 2
  • View file @ 43a2961c

  • Edit in single-file editor

  • Open in Web IDE


@@ -19,7 +19,7 @@ npx create-react-app my-app --template typescript
yarn create react-app my-app --template typescript
```
> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that `npx` always uses the latest version.
> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that `npx` always uses the latest version.
>
> Global installs of `create-react-app` are no longer supported.
@@ -47,7 +47,7 @@ You are not required to make a [`tsconfig.json` file](https://www.typescriptlang
## Troubleshooting
If your project is not created with TypeScript enabled, npx may be using a cached version of `create-react-app`. Remove previously installed versions with `npm uninstall -g create-react-app` (see [#6119](https://github.com/facebook/create-react-app/issues/6119#issuecomment-451614035)).
If your project is not created with TypeScript enabled, npx may be using a cached version of `create-react-app`. Remove previously installed versions with `npm uninstall -g create-react-app` or `yarn global remove create-react-app` (see [#6119](https://github.com/facebook/create-react-app/issues/6119#issuecomment-451614035)).
If you are currently using [create-react-app-typescript](https://github.com/wmonk/create-react-app-typescript/), see [this blog post](https://vincenttunru.com/migrate-create-react-app-typescript-to-create-react-app/) for instructions on how to migrate to Create React App.
docusaurus/docs/getting-started.md
+ 1
- 1
  • View file @ 43a2961c

  • Edit in single-file editor

  • Open in Web IDE


@@ -14,7 +14,7 @@ cd my-app
npm start
```
> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that `npx` always uses the latest version.
> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that `npx` always uses the latest version.
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_
packages/react-scripts/scripts/init.js
+ 7
- 0
  • View file @ 43a2961c

  • Edit in single-file editor

  • Open in Web IDE


@@ -103,6 +103,13 @@ module.exports = function (
'create-react-app'
)} are no longer supported.`
);
console.error(
`You can fix this by running ${chalk.cyan(
'npm uninstall -g create-react-app'
)} or ${chalk.cyan(
'yarn global remove create-react-app'
)} before using ${chalk.cyan('create-react-app')} again.`
);
return;
}
README.md
+ 1
- 1
  • View file @ 43a2961c

  • Edit in single-file editor

  • Open in Web IDE


@@ -17,7 +17,7 @@ cd my-app
npm start
```
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` to ensure that npx always uses the latest version.
If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, we recommend you uninstall the package using `npm uninstall -g create-react-app` or `yarn global remove create-react-app` to ensure that npx always uses the latest version.
_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
2
CLA Signed tag: documentation
2
CLA Signed tag: documentation
    Assign labels
  • Manage project labels

Milestone
4.0
4.0
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 participants
Administrator
Nick McCurdy
Reference: facebook/create-react-app!9244
Source branch: github/fork/nickmccurdy/explain-how-to-uninstall-create-react-app-globally

Menu

Explore Projects Groups Snippets