Bit failed in Docker Images

Hi Guys

When I install the component in my node app through npm from bit it works fine until I add it to the docker image. When building the docker image it tells me the component is not published on NPM.

So then I try installing it using bit which adds it to my package.json file using a file link however then when building the docker image I get an error that it can not find the file.

npm ERR! enoent ENOENT: no such file or directory, open ‘/measure/node_modules/@bit/climateclever.server.errors-router/package.json’

npm ERR! enoent This is related to npm not being able to find a file.

Does anybody have any experience getting bit to work in a Docker file?

Does your component have the package.json file that npm is complaining about? If you export it and then do a bit import for your component, it should create the package.json file.

Another thing that comes to mind: I am not using Docker, but had some trouble deploying to AWS Elastic Beanstalk, because it is using it’s own npm setup, which Docker might do as well. npm did not find any of the packages, so I had to add the @bit registry first through the .npmrc file.