Local edx-platform, paver and Juniper

Hi there.

Since the update to Juniper, the command shown in the docs to collect assets for a local edx-platform repo does not work:

openedx@2a005c2190dc:~/edx-platform$ paver update_assets --settings=tutor.development

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_node_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
---> pavelib.assets.process_xmodule_assets
---> pavelib.prereqs.install_python_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
xmodule_assets common/static/xmodule
Traceback (most recent call last):
  File "/openedx/venv/bin/xmodule_assets", line 11, in <module>
    load_entry_point('XModule', 'console_scripts', 'xmodule_assets')()
  File "/openedx/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/openedx/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/openedx/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/openedx/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/static_content.py", line 23, in <module>
    from xmodule.capa_module import ProblemBlock
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/capa_module.py", line 15, in <module>
    from capa import responsetypes
  File "/openedx/edx-platform/common/lib/capa/capa/responsetypes.py", line 48, in <module>
    from openedx.core.djangolib.markup import HTML, Text
ImportError: No module named 'openedx.core'

I’ve just replaced the paver with the one used when building the openedx-dev image without issues:

openedx-assets webpack --env=dev

However, I’m not sure if the docs should just be updated, or if there is some misconfiguration on my side or on Tutor’s side that is preventing the paver pipeline from running.

Any ideas?

I do not manage to reproduce your issue, but I’m getting another error when I’m running paver update_assets --settings=tutor.development:

---> pavelib.assets.update_assets
---> pavelib.prereqs.install_node_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
---> pavelib.assets.process_xmodule_assets
---> pavelib.prereqs.install_python_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
xmodule_assets common/static/xmodule
Traceback (most recent call last):
  File "/openedx/venv/bin/xmodule_assets", line 11, in <module>
    load_entry_point('XModule', 'console_scripts', 'xmodule_assets')()
  File "/openedx/edx-platform/common/lib/xmodule/xmodule/static_content.py", line 297, in main
    INSTALLED_APPS=installed_apps,
  File "/openedx/venv/lib/python3.5/site-packages/django/conf/__init__.py", line 107, in configure
    raise RuntimeError('Settings already configured.')
RuntimeError: Settings already configured.
...

This command can be replaced by openedx-assets build --env=dev. I’ll update the docs accordingly.

1 Like

mkdir_p path(‘common/static/common/js/vendor’)
mkdir_p path(‘common/static/common/css’)
mkdir_p path(‘common/static/common/css/vendor’)
Copying vendor files into static directory
/bin/cp -rf node_modules/backbone.paginator/lib/backbone.paginator.js common/static/common/js/vendor
/bin/cp -rf node_modules/backbone/backbone.js common/static/common/js/vendor
Traceback (most recent call last):
File “/openedx/bin/openedx-assets”, line 218, in
main()
File “/openedx/bin/openedx-assets”, line 89, in main
args.func(args)
File “/openedx/bin/openedx-assets”, line 94, in run_build
run_npm(args)
File “/openedx/bin/openedx-assets”, line 117, in run_npm
assets.process_npm_assets()
File “/openedx/edx-platform/pavelib/assets.py”, line 654, in process_npm_assets
copy_vendor_library(library)
File “/openedx/edx-platform/pavelib/assets.py”, line 625, in copy_vendor_library
raise Exception(‘Missing vendor file {library_path}’.format(library_path=library_path))
Exception: Missing vendor file node_modules/bootstrap/dist/js/bootstrap.bundle.js

Hi @regis. I run command openedx-assets build --env=dev in cms then I got error. How to fix this error ?

@trungdiep Please open a separate topic to talk about your specific issue. You almost certainly have to run npm install, as suggested in the docs.

1 Like

Actually, I do according to the docs. Then I got a this error

,