Skip to content

Instantly share code, notes, and snippets.

@vegaasen
Created February 8, 2018 08:50
Show Gist options
  • Save vegaasen/ff801af1b5ed286ceda2a55112c67a73 to your computer and use it in GitHub Desktop.
Save vegaasen/ff801af1b5ed286ceda2a55112c67a73 to your computer and use it in GitHub Desktop.
NPM quirks cheatsheet (angular, bootstrap, redux and the like)

NPM Quirks and the like

Introduction

Problems

Depending on node-sass within a firewall'd office

Requirements:

  • Nexus
  • Nexus being able to contact github.com
  • GitHub.com being defined as a separate remote repository

Problem: node-sass is dependent on a file that exists on ze internetz. When trying to auto-install this dependency, npm tries to download it directly from github.com. As this is forbidden through policies/firewalls, it is not that feasable. It is also not that simple to just forward through a normal NPM-repository, as it is not actually hosted in one.

Solution: In order to enable node-sass downloading: Add the following to your .npmrc-file:

sass_binary_site=https://your-nexus-host/repository/github-group/sass/node-sass/releases/download

https://github.com is proxied through Nexus at https://your-nexus-host/repository/github-group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment