Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM not found? #6

Open
martzmakes opened this issue Jan 3, 2016 · 9 comments
Open

NPM not found? #6

martzmakes opened this issue Jan 3, 2016 · 9 comments

Comments

@martzmakes
Copy link

Hi, I am trying to get this working but am having trouble. I cloned the repo, added my config.json file and then ran ./homebridge.sh build and got:

~/homebridge-docker$ ./homebridge.sh build
sed: -e expression #1, char 1: unknown command: `.'
Sending build context to Docker daemon 116.2 kB
Step 1 : FROM debian:jessie
 ---> 23cb15b0fcec
Step 2 : MAINTAINER Patrick Busch <[email protected]>
 ---> Using cache
 ---> c855dba22676
Step 3 : RUN apt-get update
 ---> Using cache
 ---> 51d38427a38c
Step 4 : ENV LANG en_US.UTF-8
 ---> Using cache
 ---> a2da2c7a72b1
Step 5 : ENV LC_ALL en_US.UTF-8
 ---> Using cache
 ---> 406786b1398e
Step 6 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> f9440dcd0709
Step 7 : ENV TERM xterm
 ---> Using cache
 ---> 7bd790c54b9c
Step 8 : RUN apt-get install -y curl wget git apt-transport-https python build-essential make g++ libavahi-compat-libdnssd-dev libkrb5-dev vim net-tools
 ---> Using cache
 ---> 068a27640612
Step 9 : RUN alias ll='ls -alG'
 ---> Using cache
 ---> 5f46cecdb45e
Step 10 : RUN npm install -g homebridge
 ---> Running in 513493eaa828
/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install -g homebridge' returned a non-zero code: 127

Any ideas?

@snizzleorg
Copy link
Contributor

probably your docker containers don't have network and therefore the apt-get failed. I had this problem on a raspberrypi.

@martzmakes
Copy link
Author

no reason it shouldn't have network... it's in docker build, after all. I have a few other containers up and running doing things with the network

@snizzleorg
Copy link
Contributor

try to delete the cache and see if the apt-get steps runs alright...

@martzmakes
Copy link
Author

@snizzleorg there is no cache, it's using docker image (which has no cache initially)

@martzmakes
Copy link
Author

it looks like the Dockerfile.specific is never getting into the Dockerfile...

something to do with this perhaps:

sed: -e expression #1, char 1: unknown command: `.'

@martzmakes
Copy link
Author

@snizzleorg In the homebridge.sh file there's an offending '.bak' in the SED expression... I don't think it should be there, and seems to be causing the problem.

@snizzleorg
Copy link
Contributor

yeah but the docker image is built by the script and the interims images are stored on your computer. so the the one you built doesn't have nam installed (probably because during the build there was no network)

@snizzleorg
Copy link
Contributor

@oehokie Just saw your last comments. It did work for me... but maybe it's been changed since I used it to build the image.

@claudiuo claudiuo mentioned this issue Oct 23, 2016
@ericgoedtel
Copy link

The problem is that the base image doesn't seem to actually ship with node? This is using a vanilla Jessy image as the upstream. NPM is straight up not installed at any time during build. What OS are you running this on? I'm seeing this on Ubuntu 16.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants