Closed rabejens closed 8 years ago
I believe that npm install
's --no-bin-links
argument needs to be provided so that the ./node_modules/.bin/
symlink is not created.
I get this error all the time from npm inside Docker on some machines.
So step 9
should be npm install --no-bin-links
. Since bower is installed globally I think this only needs to go on the middle part between the &&
s, but I may be wrong.
The main downside to it is since the .bin symlink is avoided, if you need to use it you gotta manually go to it. For example with the jasmine testing framework ./node_modules/.bin/jasmine
becomes ./node_modules/jasmine/bin/jasmine
I hit this issue yesterday and I think that you can get around it by creating a symlink of your ./node_modules
directory to an area outside of your shared folders, i.e. mkdir ~/tmp_node_modules && ln -s ~/tmp_node_modules ./node_modules
, and then running npm install
.
I created a small command line tool called sympm
that automates those steps and acts as a replacement for npm install
(without any arguments, of course) when inside of a virtual machine. You don't need to install with flags like --no-bin-links
; everything should behave correctly.
Maybe it'll be helpful to somebody here.
Try my fork - improved Dockerfile
If others find @ezekg @ryanshawty works for them, I will merge Pull Request #33. Let me know. Thanks!
I think you mean @ryanshawty's solution, mine was the npm tool above his fork. 👌
@Glavin001 @rabejens this issue can be closed.
Thanks!
When I just check out the source and do a simple
docker build
, after a lengthy compilation I get:I am using the official node image because the one from Google is deprecated.
It fails at step 9:
RUN npm install -g bower && npm install && bower --allow-root install