instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.71k stars 2.52k forks source link

The command '/bin/sh -c COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets' returned a non-zero code: 1 #1357

Closed leasonliu closed 6 years ago

leasonliu commented 6 years ago

Summary:

Try to set up a production version with docker. Failed when I ran the command './script/docker_dev_setup.sh',

The ERROR is: ERROR: Service 'webpack' failed to build: The command '/bin/sh -c COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets' returned a non-zero code: 1

My environment: Ubuntu server 16.04

Steps to reproduce:

  1. clone the source code from the master branch
  2. cd into the canvas-lms folder
  3. run the command './script/docker_dev_setup.sh'

Expected behavior:

no error

Actual behavior:

Throw error: ERROR: Service 'webpack' failed to build: The command '/bin/sh -c COMPILE_ASSETS_NPM_INSTALL=0 bundle exec rake canvas:compile_assets' returned a non-zero code: 1

Additional notes:

djbender commented 6 years ago

Hi @leasonliu!

Can you pull master and run yarn install again? We just merged 0104c229b the other day which I'm guessing might be your issue. Otherwise, we'll need to see more of the logs since the error was most likely further back in the logging output.

leasonliu commented 6 years ago

Hi @leasonliu!

Can you pull master and run yarn install again? We just merged 0104c22 the other day which I'm guessing might be your issue. Otherwise, we'll need to see more of the logs since the error was most likely further back in the logging output.

I tried to pull the repo again, and the error changed to:

ERROR: Cannot create container for service web: Conflict. The container name "/canvaslms_web_run_1" is already in use by container aee8292f31a00e69b395ac175a956e5d08cfa5190fbbbf3b33102ca30166dc6a. You have to remove (or rename) that container to be able to reuse that name.

leasonliu commented 6 years ago

Hi @leasonliu! Can you pull master and run yarn install again? We just merged 0104c22 the other day which I'm guessing might be your issue. Otherwise, we'll need to see more of the logs since the error was most likely further back in the logging output.

I tried to pull the repo again, and the error changed to:

ERROR: Cannot create container for service web: Conflict. The container name "/canvaslms_web_run_1" is already in use by container aee8292f31a00e69b395ac175a956e5d08cfa5190fbbbf3b33102ca30166dc6a. You have to remove (or rename) that container to be able to reuse that name.

solved by changing the name of the container aee829, but still not sure why there are duplicate container names.