Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
84
rated 0 times [  86] [ 2]  / answers: 1 / hits: 70401  / 8 Years ago, fri, october 14, 2016, 12:00:00

I'm using the node:6.7.0 image as my docker container and then follow the installation guide for yarn



sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3
echo deb http://dl.yarnpkg.com/debian/ stable main | sudo tee /etc/apt/sources.list.d/yarn.list


Then I do



apt-get update && apt-get install yarn


But at this point I get an error message which says



yarn : Depends: nodejs (>= 4.0.0) but it is not going to be installed


I've echoed node -v before the install and it also says 6.7.0



Anything that I'm missing?


More From » node.js

 Answers
195

robertklep is right - if you check the Dockerfile for Node you'll see they install Node by downloading the TAR, not through APT. You can check this by running an interactive container:



> docker run -it node:6.7.0 bash
root@465fa07437c9:/# dpkg -s nodejs
dpkg-query: package 'nodejs' is not installed and no information is available


You can use NPM in your Dockerfile instead:



FROM node:6.7.0
RUN npm install -g yarn

[#60394] Wednesday, October 12, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arron

Total Points: 663
Total Questions: 119
Total Answers: 112

Location: Belize
Member since Mon, Jun 20, 2022
2 Years ago
;