Npm from conda environment picking up host system node.js installation

0 views
Skip to first unread message

Tareef Dedhar

unread,
Oct 14, 2020, 12:19:10 AM10/14/20
to Anaconda - Public
Hi there

I have a Docker image in which there is an installation of node 14. I also have conda installed, and I created two environments for it, one with node10, and one with node12. An example environment.yml that was used would be:
```
name: node10
channels:
 - conda-forge
dependencies:
 - nodejs=10.*
 - jupyter
```
However, once it is created, if you run `npm --versions` from that environment, it picks up the node.js installation from the host, not the environment:
```
Step 45/55 : RUN ./bin/npm --versions
---> Running in d332fb4b48f7
{
 npm: '6.14.6',
 ares: '1.16.1',
 brotli: '1.0.9',
 cldr: '37.0',
 icu: '67.1',
 llhttp: '2.1.3',
 modules: '83',
 napi: '7',
 nghttp2: '1.41.0',
 node: '14.13.1',
 openssl: '1.1.1g',
 tz: '2020a',
 unicode: '13.0',
 uv: '1.40.0',
 v8: '8.4.371.19-node.16',
 zlib: '1.2.11'
}
```
(note the line ` node: '14.13.1'`). 

Any idea why this might be the case, and how to resolve it? Btw I am using debian buster and miniconda 4.8.2 w/ python 3.8. 
Reply all
Reply to author
Forward
0 new messages