Skip to content

Commit 864874b

Browse files
authored
Rewrite issue template to mention yarn/npm problems
1 parent 9d67605 commit 864874b

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

.github/ISSUE_TEMPLATE.md

+26-17
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,44 @@
2424
You can find webpack docs at https://webpack.js.org/.
2525
-->
2626

27-
28-
### Can you also reproduce the problem with npm 4.x?
27+
### Did you try recovering your dependencies?
2928

3029
<!--
31-
Many errors, especially related to "missing modules", are due to npm bugs.
32-
Which version of npm are you running? You can find out by checking:
33-
34-
npm -v
30+
Your module tree might be corrupted, and that might be causing the issues.
31+
Let's try to recover it. First, delete these files and folders in your project:
3532
36-
If it is 5.x, please be aware that it has more than 50 known bugs, and
37-
is not guaranteed to work with Create React App.
33+
* node_modules
34+
* package-lock.json
35+
* yarn.lock
3836
39-
If it's not starting with 4, try to install npm 4.x:
37+
Then you need to decide which package manager you prefer to use.
38+
We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).
39+
However, **they can't be used together in one project** so you need to pick one.
40+
41+
If you decided to use npm, run this in your project directory:
4042
41-
npm install -g npm@4
42-
cd your_project_directory
43-
rm -rf node_modules
44-
npm cache clear
43+
npm install -g npm@latest
4544
npm install
4645
47-
Then try to reproduce the issue again.
48-
Can you still reproduce it?
46+
This should fix your project.
47+
48+
If you decided to use yarn, update it first (https://yarnpkg.com/en/docs/install).
49+
Then run in your project directory:
50+
51+
yarn
52+
53+
This should fix your project.
4954
50-
Note: Please try this even if you are using Yarn so that we know whether it's a Yarn-only bug.
55+
Importantly, **if you decided to use yarn, you should never run `npm install` in the project**.
56+
For example, yarn users should run `yarn add <library>` instead of `npm install <library>`.
57+
Otherwise your project will break again.
58+
59+
Have you done all these steps and still see the issue?
60+
Please paste the output of `npm --version` and/or `yarn --version` to confirm.
5161
-->
5262

5363
(Write your answer here.)
5464

55-
5665
### Which terms did you search for in User Guide?
5766

5867
<!--

0 commit comments

Comments
 (0)