'npm init' needed before installing react via npm. (#8649)
* 'npm init' needed before installing react via npm. I was trying to install react in my django project directory and was getting warnings about package.json not being present. Started this SO post (http://stackoverflow.com/questions/41340909/npm-cant-find-package-json-when-installing-react/41340975#41340975) to figure it out. I think it'll be useful to others too if we add it in the documentation itself. * Tweak instructions
gitanupam committed
Dec 28, 2016 at 17:34 UTC
86765baaef4f5ff5e4f3f2727a016cf7a196a6ee
1 file changed
+2
docs/docs/installation.md
+2
@@ -52,12 +52,14 @@ We recommend using [Yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/)
52
To install React with Yarn, run:
53
54
```bash
55
+yarn init
56
yarn add react react-dom
57
```
58
59
To install React with npm, run:
60
61
```bash
62
+npm init
63
npm install --save react react-dom
64
```
65