- Mastering React Test:Driven Development
- Daniel Irvine
- 251字
- 2021-06-24 14:45:01
Installing NPM
We’ll be making extensive use of the npm command-line tool and the Node.js execution environment. Each time you run your tests, which will be very frequently, you'll be required to run an npm command.
Toward the end of the chapter, we'll also use npm to package our application.
You can find out if you already have it installed on your machine by opening a Terminal window (or Command Prompt if you’re on Windows) and typing the following:
npm -v
If the command isn’t found, head on over to the Node.js website for details on how to install. The URL is included at the end of this chapter.
The npm program knows how to update itself, so if it's installed, I recommend you ensure you’re on the latest version. You can do this on the command line by typing this:
npm install npm@latest -g
I'm using version 6.9.0 to write this book. If you have any issues with the code samples contained here, differing NPM versions could be one of the causes, so please bear that in mind as you continue.
Yet another resource negotiator ( YARN) is an alternative to NPM, and I won’t hold it against you if you choose to use it. There are only a handful of npm commands in this book—I assume that if you’re sticking with YARN, then you’ll already know how to convert npm commands to yarn commands.
- Practical Data Analysis Cookbook
- Mastering Entity Framework Core 2.0
- 高效微控制器C語言編程
- 簡單高效LATEX
- Selenium Design Patterns and Best Practices
- OpenStack Cloud Computing Cookbook(Fourth Edition)
- Symfony2 Essentials
- Learning ArcGIS for Desktop
- JavaCAPS基礎、應用與案例
- 精通Python自動化編程
- Clojure for Java Developers
- jQuery技術內幕:深入解析jQuery架構設計與實現原理
- JavaScript悟道
- Modular Programming with JavaScript
- Python應用開發技術