Git Product home page Git Product logo

node-js-fix-the-dependencies-sfo-web-012720's Introduction

Fix the Dependencies

Overview

In this lab, we're going to explore how to resolve dependency issues in Node.js. We've provided a bare-bones project in lib/ — it currently fails all its tests. Your job is to make sure the tests pass.

Goals

  1. Explain errors that npm prints during npm install
  2. Determine solutions based the errors that npm provides
  3. Explain npm peerDepencies

Getting started

Run npm test — you'll notice that everything crashes. Like before, we'll need to install a few packages just to get tests to run. But even with those packages installed, things won't run quite as expected.

peerDependencies

Before we set you loose, there's one last thing we need to introduce (and we promise not to make the whole introduction in rhyming couplets).

npm has a concept of peerDependencies that's important to understand. peerDependencies (which can be declared in a package.json just like dependencies and devDependencies) describe packages that require a "host" package — you can think of peerDependencies as plugins. One example of a host package that we've already encountered is Chai.js. Each Chai plugin has chai as a peerDependency, meaning that the plugin expects that it will be required in an environment that also has chai.

NOTE: There will be a warning that a peerDependency hasn't been met no matter what. It's currently an open issue on npm: npm/npm#3218. The trick is still to make sure to get the right version of the peerDependency from the repository that we've provided. (Remember that you can refer to specific commits.)

node-js-fix-the-dependencies-sfo-web-012720's People

Contributors

pletcher avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.