Skip to content

Docker build fails to yarn install #99

@icarito

Description

@icarito

After having built, examining the container, no node_modules directory is found.

There is a strange message about not having connection, also during build stage.

Worked around this by running yarn from Docker host.

icarito@tycho:/srv/plotsbot/plotsbot$ docker-compose up -d
Creating network "plotsbot_default" with the default driver
Creating plotsbot_plotsbot_1 ... 
Creating plotsbot_plotsbot_1 ... done
icarito@tycho:/srv/plotsbot/plotsbot$ docker-compose ps
       Name            Command     State    Ports 
-------------------------------------------------
plotsbot_plotsbot_1   yarn start   Exit 1         
icarito@tycho:/srv/plotsbot/plotsbot$ docker-compose logs plotsbot
Attaching to plotsbot_plotsbot_1
plotsbot_1  | yarn run v1.2.1
plotsbot_1  | warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
plotsbot_1  | $ node .
plotsbot_1  | module.js:538
plotsbot_1  |     throw err;
plotsbot_1  |     ^
plotsbot_1  | 
plotsbot_1  | Error: Cannot find module 'github'
plotsbot_1  |     at Function.Module._resolveFilename (module.js:536:15)
plotsbot_1  |     at Function.Module._load (module.js:466:25)
plotsbot_1  |     at Module.require (module.js:579:17)
plotsbot_1  |     at require (internal/module.js:11:18)
plotsbot_1  |     at Object.<anonymous> (/usr/src/app/src/bot.js:2:16)
plotsbot_1  |     at Module._compile (module.js:635:30)
plotsbot_1  |     at Object.Module._extensions..js (module.js:646:10)
plotsbot_1  |     at Module.load (module.js:554:32)
plotsbot_1  |     at tryModuleLoad (module.js:497:12)
plotsbot_1  |     at Function.Module._load (module.js:489:3)
plotsbot_1  | error Command failed with exit code 1.
plotsbot_1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
icarito@tycho:/srv/plotsbot/plotsbot$ 

Still opened issue to keep track and fix! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions