Move where npm config is set
MODIFY
repo2docker/buildpacks/conda/__init__.py
repo2docker/buildpacks/conda/__init__.py
@@ -96,12 +96,6 @@ class CondaBuildPack(BaseImage):
chown -R ${NB_USER}:${NB_USER} ${NPM_DIR}
""",
),
- (
- "${NB_USER}",
- r"""
- ${NB_PYTHON_PREFIX}/bin/npm config --global set prefix ${NPM_DIR}
- """,
- ),
]
major_pythons = {"2": "2.7", "3": "3.7"}

MODIFY
repo2docker/buildpacks/conda/install-miniforge.bash
repo2docker/buildpacks/conda/install-miniforge.bash
@@ -48,6 +48,9 @@ echo "installing notebook env:"
cat /tmp/environment.yml
time mamba env create -p ${NB_PYTHON_PREFIX} -f /tmp/environment.yml
+# Set NPM config
+${NB_PYTHON_PREFIX}/bin/npm config --global set prefix ${NPM_DIR}
+
# empty conda history file,
# which seems to result in some effective pinning of packages in the initial env,
# which we don't intend.

Move where npm config is set