- 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.
- ServiceNow Application Development
- Mobile Application Development:JavaScript Frameworks
- OpenShift開發指南(原書第2版)
- Python數據分析基礎
- Developing Middleware in Java EE 8
- Visual Basic程序設計(第3版):學習指導與練習
- Java從入門到精通(第5版)
- WordPress Plugin Development Cookbook(Second Edition)
- Solr Cookbook(Third Edition)
- 持續集成與持續交付實戰:用Jenkins、Travis CI和CircleCI構建和發布大規模高質量軟件
- 愛上C語言:C KISS
- Application Development with Swift
- 深度實踐KVM:核心技術、管理運維、性能優化與項目實施
- Learning D
- Visual Basic程序設計基礎