precompiling assets getting failed for CMS(studio)

841 views
Skip to first unread message

SUMAN GHOSH

unread,
Feb 4, 2015, 10:04:08 AM2/4/15
to edx-...@googlegroups.com
I have installed edX production successfully on ubuntu 12.04 server and its up & running but when I try to compile assets manually I get the following error incase of CMS only :-

$ paver update_assets cms --settings=aws



---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_
prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets


2015-02-04 08:10:02,512 INFO 13492 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`


sass --style compressed  --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
      write lms/static/sass/application-extend1-rtl.css
      write lms/static/sass/application-extend1.css
      write lms/static/sass/application-extend2-rtl.css
DEPRECATION WARNING on line 32 of lms/static/sass/views/_login-register.scss:
Assigning to global variable "$grid-columns" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$grid-columns: 12 !global" instead.
Note that this will be incompatible with Sass 3.2.

      write lms/static/sass/application-extend2.css
      write lms/static/sass/application-rtl.css
      write lms/static/sass/application.css


      write lms/static/sass/course-rtl.css
      write lms/static/sass/course.css
python manage.py cms --settings=aws collectstatic --noinput > /dev/null
2015-02-04 08:10:35,827 INFO 13736 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125


Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.


Captured Task Output:
---------------------

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed  --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
python manage.py cms --settings=aws collectstatic --noinput > /dev/null

Build failed running pavelib.assets.update_assets: Subprocess return code: 1

Sarina Canelake

unread,
Feb 4, 2015, 5:26:19 PM2/4/15
to edx-code
Hi Suman,

What version of the codebase are you running? I'm not seeing this in master, so I am wondering if there was maybe a bug in the past that's been fixed.

SUMAN GHOSH

unread,
Feb 5, 2015, 12:42:39 AM2/5/15
to edx-...@googlegroups.com
Hello Sarina,
                 Thanks for your response,I followed the instructions here https://github.com/edx/configuration/wiki/edX-Ubuntu-12.04-64-bit-Installation for installation, and installation is also recent will check if it works after updating.

Sarina Canelake

unread,
Feb 5, 2015, 1:15:10 PM2/5/15
to edx-code
Hi Suman,

As I said, I've not seen that error and don't know particularly how to help further. I don't have an Ubuntu machine so I can't test.

The openedx-ops mailing list may be a better place to ask operational questions like this.

Best
Sarina

Fernando Alonzo

unread,
Feb 19, 2015, 7:08:17 PM2/19/15
to edx-...@googlegroups.com
Hey Suman, did you fix this error?

I'm getting the same error message when trying to deploy Birch RC3 using the ansible scripts.

Here's the full message:


failed: [localhost] => (item=cms) => {"changed": true, "cmd": ["/edx/bin/edxapp-update-assets-cms"], "delta": "0:00:41.286315", "end": "2015-02-19 18:10:46.240909", "item": "cms", "rc": 1, "start": "2015-02-19 18:10:04.954594"}
stderr: 2015-02-19 13:10:06,029 INFO 12530 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
DEPRECATION WARNING on line 32 of lms/static/sass/views/_login-register.scss:
Assigning to global variable "$grid-columns" by default is deprecated.
In future versions of Sass, this will create a new local variable.
If you want to assign to the global variable, use "$grid-columns: 12 !global" instead.
Note that this will be incompatible with Sass 3.2.

2015-02-19 13:10:40,167 INFO 12876 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.
stdout: ---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed  --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
      write lms/static/sass/application-extend1-rtl.css
      write lms/static/sass/application-extend1.css
      write lms/static/sass/application-extend2-rtl.css
      write lms/static/sass/application-extend2.css
      write lms/static/sass/application-rtl.css
      write lms/static/sass/application.css
      write lms/static/sass/course-rtl.css
      write lms/static/sass/course.css
python manage.py cms --settings=aws collectstatic --noinput > /dev/null


Captured Task Output:
---------------------

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
---> pavelib.prereqs.install_node_prereqs
python manage.py cms --settings=aws preprocess_assets
xmodule_assets common/static/xmodule
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
sass --style compressed  --cache-location /tmp/sass-cache --load-path ./common/static/sass --update -E utf-8 */static
python manage.py cms --settings=aws collectstatic --noinput > /dev/null

Build failed running pavelib.assets.update_assets: Subprocess return code: 1

FATAL: all hosts have already failed -- aborting

Chetan Parekh

unread,
May 14, 2015, 12:12:47 PM5/14/15
to edx-...@googlegroups.com
Hello,

Just install node module uglifyjs and will work.

npm install uglify-js -g

Mario Torrisi

unread,
May 29, 2015, 12:55:28 PM5/29/15
to edx-...@googlegroups.com
Hello everyone,

I'm facing the same issue during the edx installation on a fresh Ubuntu 12.04. 
There is anyone that overcame this problem installing uglifyjs? 

Thanks in advance

Aparna P

unread,
Sep 3, 2015, 5:50:32 AM9/3/15
to General Open edX discussion
Hi,
I had the same error. But in my case, I had run out of disk space. Just freeing up some space did the trick for me!
Aparna

Zachary Trabookis

unread,
Sep 10, 2015, 3:46:04 PM9/10/15
to General Open edX discussion
@nedbat suggested that I run the following command instead of paver update_assets lms --settings=aws for more details as to why I was getting this error.

Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.


Run this command for more details.

edxapp@educateworkforce-dev-ztraboo:~/edx-platform$
     python manage.py cms --settings=aws collectstatic --noinput

Here are the results that I need to resolve this problem.
Error: Parse error using esprima for file: /tmp/tmpzFaCF8/js/views/settings/main.js
Error: Line 393: Unexpected identifier
In module tree:
    js/factories/settings

Error: Error: Parse error using esprima for file: /tmp/tmpzFaCF8/js/views/settings/main.js
Error: Line 393: Unexpected identifier
In module tree:
    js/factories/settings

    at /edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/require/resources/r.js:25301:47

Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 169, in handle_noargs
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/src/django-staticfiles/staticfiles/management/commands/collectstatic.py", line 126, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.


I resolved this by fixing the missing comma and updating the assets again.

Reply all
Reply to author
Forward
0 new messages