Open git-madhav opened 9 years ago
firefox 37.0.2 on OS X 10.10.3 works for me. Does it only happen on windows/linux?
So far the two machines I have tried, yes it happens with windows and Linux.
Regards, Madhav.
Sent from iPhone!
On May 13, 2015, at 9:09 PM, Chad McElligott notifications@github.com wrote:
firefox 37.0.2 on OS X 10.10.3 works for me. Does it only happen on windows/linux?
— Reply to this email directly or view it on GitHub.
Once bower gets installed, restaurant list gets populated.
npm install -g bower
and bower install
in Frontier directory should fix this issue.
Thanks to Dusty for this fix.
-Madhav.
for what it's worth, the bower dependencies should have automatically been installed when you do npm install
. The fact that they were not is strange to me. Might be worth looking into if this ever happens again.
It came to light that @git-madhav was using the Docker instructions for running the app, so there may be an issue with running bower in the npm postinstall script due to the docker environment. Looking into that now.
So i figured out what caused this issue.
make build
when you have already installed your node_modules, it will just copy those files over in the COPY . /frontier
step of the Dockerfile. The subsequent command RUN npm install
will then do pretty much nothing since all the modules are already there. This causes an issue if you are, for example, running boot2docker on OSX and the node_modules have platform-specific things in them. In this case, the download of the ngrok binary looks at your architecture and platform to determine which binary to download. Since I already had installed node_modules prior to running make build
, it copied my OSX ngrok binary over into the image, and when it tried to require('ngrok')
inside the docker image it exploded because the binary it was trying to run was compiled for OSX not Ubuntu. This was also causing some weirdness with detecting the issue with the bower_components installation, since the docker image that I had built already had the bower_components installed, it was initially unclear to me how the bower_components existed even though they were failing to install.The bower install
npm postinstall script was failing with the message
npm WARN cannot run in wd Frontier@1.0.0 bower install --config.interactive=false --allow-root (wd=/frontier)
This was because npm doesn't like being run as root
user. I can fix this temporarily by passing the command line flag --unsafe-perm
to npm to get it to force the install, but it's generally considered bad practice.
--unsafe-perm
passed to npm, bower doesn't like being run as root. To get it to run anyway, you can pass --allow-root
to it to get it to run.So the takeaways here are that the Dockerfile needs to:
COPY
the node_modules or public/bower_components directoriesnpm install
is run as that user.@clarkda said he's planning to submit a pr to address these issues with the Dockerfile
Chad,
if I use the https://6f615fd.ngrok.com on windows chrome browser, pointing to virtual box / ubuntu14, it works fine.
if I do the same on virtual box / ubuntu firefox browser, it doesn't display the list, and it doesn't give an error either. Debug window doesn't show much.
I just noticed, it might be firefox browser issue. I tried to use firefox on windows, it did not work either.
Any ideas?
-Madhav.