question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker web_1 startup issue

See original GitHub issue

This is the output I get:

web_1      | PUT bucket code: 000
web_1      | Done!
web_1      | yarn run v1.5.1
web_1      | $ node scripts/dev-server.js
web_1      | module.js:549
web_1      |     throw err;
web_1      |     ^
web_1      | 
web_1      | Error: Cannot find module 'chalk'
web_1      |     at Function.Module._resolveFilename (module.js:547:15)
web_1      |     at Function.Module._load (module.js:474:25)
web_1      |     at Module.require (module.js:596:17)
web_1      |     at require (internal/module.js:11:18)
web_1      |     at Object.<anonymous> (/code/scripts/dev-server.js:2:15)
web_1      |     at Module._compile (module.js:652:30)
web_1      |     at Object.Module._extensions..js (module.js:663:10)
web_1      |     at Module.load (module.js:565:32)
web_1      |     at tryModuleLoad (module.js:505:12)
web_1      |     at Function.Module._load (module.js:497:3)
web_1      | error An unexpected error occurred: "Command failed.
web_1      | Exit code: 1
web_1      | Command: sh
web_1      | Arguments: -c node scripts/dev-server.js
web_1      | Directory: /code
web_1      | Output:
web_1      | ".
web_1      | info If you think this is a bug, please open a bug report with the information provided in "/code/yarn-error.log".
web_1      | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
voice-web_web_1 exited with code 1

I have zero experience with modern JavaScript/TypeScript, and almost no experience with docker, so maybe I am doing something obviously stupid.

I have the latest version of the voice-web repo.

npm --version 5.6.0 docker --version Docker version 18.03.1-ce, build 9ee9f40 yarn --version 1.6.0

Let me know if you need further information.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
johngiancommented, Jun 20, 2018

OK so the problem is the following:

  • When we build the docker images for web, yarn installs the dependencies just fine under ./node_modules
  • When we run web using docker-compose, we mount the repo folder to the container in order to be able to change the codebase for development purposes
  • In a clean repo ./node_modules doesn’t exist and overwrites the already installed dependencies

I am opening a PR to fix this.

0reactions
jimregancommented, Jun 20, 2018

Had the same issue, #1130 worked for me too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error response from daemon: Cannot start container web1 ...
I'm getting this error why trying to start a bunch of containers subsequently. This usually happen on first run and disappear on second...
Read more >
Sometimes my web container doesn't start and I don't know why
When I run docker-compose up -d it's very common that all the containers except for my web container start up, and if I...
Read more >
docker service create - Docker Documentation
Create a service with a config. The config will be mounted into redis-config , be owned by the user who runs the command...
Read more >
Overview | Docker Documentation
Troubleshooting, logs, and known issues. ... How to diagnose and troubleshoot Docker Desktop issues; Check the logs; Find workarounds for common problems ......
Read more >
Control startup and shutdown order in Compose
How to control service startup and shutdown order in Docker Compose. ... The problem of waiting for a database (for example) to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found