Install nodejs/npm from nodesource
MODIFY
repo2docker/buildpacks/base.py
repo2docker/buildpacks/base.py
@@ -43,6 +43,11 @@ RUN adduser --disabled-password \
${NB_USER}
WORKDIR ${HOME}
+RUN wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
+ DISTRO="$(lsb_release -s -c)" \
+ echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list \
+ echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | tee -a /etc/apt/sources.list.d/nodesource.list
+
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
{% for package in base_packages -%}
@@ -175,9 +180,7 @@ class BuildPack:
# Utils!
"less",
- # FIXME: Use npm from nodesource!
- # Everything seems to depend on npm these days, unfortunately.
- "npm",
+ "nodejs",
"unzip",
}

Install nodejs/npm from nodesource