Exercise 3: Debugging Missing Packages
Learning Objectives
- recognize the error message when your program is missing a package
- be able to fix the error by installing the necessary package
Prerequisites
- you should have Node.js >= v4 installed
- you should have npm v2 or v3 installed
Instructions
- Create a directory called
exercise3 - Change into that directory using
cd exercise3 - Create a file called
index.js Cut and paste this code into
index.js:var _ = require('lodash');- Run your program.
- Fix the error!
Hints
- You can run a Node.js program by typing
node <js-file-namewherejs-file-nameis the name of a.jsfile, e.g.index,index.js