Rewrite issue template to mention yarn/npm problems

This commit is contained in:
Dan Abramov
2018-01-18 16:11:55 +00:00
committed by GitHub
parent 9d67605ab6
commit 864874bfa8

View File

@@ -24,35 +24,44 @@
You can find webpack docs at https://webpack.js.org/.
-->
### Can you also reproduce the problem with npm 4.x?
### Did you try recovering your dependencies?
<!--
Many errors, especially related to "missing modules", are due to npm bugs.
Which version of npm are you running? You can find out by checking:
Your module tree might be corrupted, and that might be causing the issues.
Let's try to recover it. First, delete these files and folders in your project:
npm -v
* node_modules
* package-lock.json
* yarn.lock
If it is 5.x, please be aware that it has more than 50 known bugs, and
is not guaranteed to work with Create React App.
Then you need to decide which package manager you prefer to use.
We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).
However, **they can't be used together in one project** so you need to pick one.
If you decided to use npm, run this in your project directory:
If it's not starting with 4, try to install npm 4.x:
npm install -g npm@4
cd your_project_directory
rm -rf node_modules
npm cache clear
npm install -g npm@latest
npm install
Then try to reproduce the issue again.
Can you still reproduce it?
This should fix your project.
If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install).
Then run in your project directory:
Note: Please try this even if you are using Yarn so that we know whether it's a Yarn-only bug.
yarn
This should fix your project.
Importantly, **if you decided to use yarn, you should never run `npm install` in the project**.
For example, yarn users should run `yarn add <library>` instead of `npm install <library>`.
Otherwise your project will break again.
Have you done all these steps and still see the issue?
Please paste the output of `npm --version` and/or `yarn --version` to confirm.
-->
(Write your answer here.)
### Which terms did you search for in User Guide?
<!--