CircleCI CLI should ignore node_modules but doesn't


We are using the CircleCI CLI (version 0.1.5546+1fae6c8) locally.

We have both a .gitignore and a .dockerignore file. Both ignore node_modules/. Both are committed so should be picked up by the CLI. My understanding of the documentation is that this should stop the node_modules directory from being copied across into my test container.

Unfortunately the node_modules directory is still being copied across. This causes “invalid ELF header” issues if you have any native modules (such as a crypto library) as these files will have been compiled on your host machine, in my case an OS X machine, and will then attempt to run in the container, in my case an alpine linux machine. Clearly this won’t work.

It looks like this issue has been posted before but without much coming from it:

This thread also appears to be relevant:

Are there any known work-arounds or is this a bug the CircleCI team intend to fix?


1 Like

Hi Danny,

Can you file a bug against the repo, please?