The Next.js Handbook
that name), then downloads all the packages it needs ( react , react- dom , next ), sets the package.json to: 9 and you can immediately run the sample app by running npm run dev : 10 And here's project, populating a sample package.json file. Now install Next and React: npm install next react react-dom Your project folder should now have 2 files: package.json (see my tutorial on it) package-lock the current folder in the editor (if the command does not work for you, see this) 14 Open package.json , which now has this content: { "name": "firstproject", "version": "1.0.0", "description":0 码力 | 54 页 | 2.61 MB | 1 年前3The React Handbook
todolist in this case) and initialized a Git repository. 8 It also added a few commands in the package.json file: so you can immediately start the app by going into the newly created application folder0 码力 | 31 页 | 1.28 MB | 1 年前3
共 2 条
- 1