- 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
- TypeScript Essentials
- ClickHouse性能之巔:從架構(gòu)設(shè)計解讀性能之謎
- Kibana Essentials
- TypeScript Blueprints
- 圖解Java數(shù)據(jù)結(jié)構(gòu)與算法(微課視頻版)
- 網(wǎng)頁設(shè)計與制作教程(HTML+CSS+JavaScript)(第2版)
- Data Analysis with IBM SPSS Statistics
- Windows Presentation Foundation Development Cookbook
- 網(wǎng)站構(gòu)建技術(shù)
- PHP與MySQL權(quán)威指南
- Scratch從入門到精通
- GO語言編程從入門到實踐
- Natural Language Processing with Python Cookbook
- CISSP in 21 Days(Second Edition)