4876: Cannot build media

Misery

What version of Djblets are you using?

Current branch release-2.0.x (4d1770de6e861ac7d81f2fbd78c21e7ef6fa24fd)

Which module(s) have the problem?

python setup.py build_media

What steps will reproduce the problem?

  1. Create virtualenv
  2. Go to current django-evolution
  3. python setup.py develop
  4. Go to current djblets
  5. python setup.py develop

What is the expected output? What do you see instead?

Expect success... see an exception of lessc

What version of Python and Django?

Python 3.8.5, Django 1.11.29

Please provide any additional information below.

Traceback (most recent call last):
File "contrib/internal/build-media.py", line 37, in <module>
call_command('collectstatic', interactive=False, verbosity=2)
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/django/core/management/init.py", line 131, in call_command
return command.execute(args, defaults)
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args,
options)
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 199, in handle
collected = self.collect()
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 139, in collect
for original_path, processed_path, processed in processor:
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/storage.py", line 26, in post_process
packager.pack_stylesheets(package)
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/packager.py", line 98, in pack_stylesheets
return self.pack(package, self.compressor.compress_css, css_compressed,
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/packager.py", line 113, in pack
paths = self.compile(
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/packager.py", line 103, in compile
return self.compiler.compile(
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/compilers/init.py", line 56, in compile
return list(executor.map(_compile, paths))
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator
yield fs.pop().result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(
self.args, self.kwargs)
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/compilers/init.py", line 41, in _compile
compiler.compile_file(infile, outfile,
File "/home/andre/git/djblets/djblets/pipeline/compilers/less.py", line 43, in compile_file
self.execute_command((
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/pipeline/compilers/init.py", line 133, in execute_command
raise CompilerError(
pipeline.exceptions.CompilerError: <filter object at 0x7f89015cddf0> exit code 1
b'internal/fs/utils.js:701\n throw new ERR_INVALID_ARG_TYPE(\n ^\n\nTypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of SourceMapGenerator\n at writeFile (fs.js:1385:5)\n at go$writeFile (/home/andre/git/djblets/node_modules/graceful-fs/graceful-fs.js:139:14)\n at Object.writeFile (/home/andre/git/djblets/node_modules/graceful-fs/graceful-fs.js:136:12)\n at writeSourceMap (/home/andre/git/djblets/node_modules/less/bin/lessc:183:10)\n at writeSourceMapIfNeeded (/home/andre/git/djblets/node_modules/less/bin/lessc:207:7)\n at /home/andre/git/djblets/node_modules/less/bin/lessc:299:11\n at /home/andre/git/djblets/node_modules/less/bin/lessc:237:11\n at /home/andre/git/djblets/node_modules/graceful-fs/graceful-fs.js:144:16\n at /home/andre/git/djblets/node_modules/graceful-fs/graceful-fs.js:61:14\n at FSReqCallback.oncomplete (fs.js:164:23) {\n code: \'ERR_INVALID_ARG_TYPE\'\n}\n'
Traceback (most recent call last):
File "setup.py", line 455, in <module>
setup(
File "/home/andre/tmp/rb/rb4/env/lib/python3.8/site-packages/setuptools/init.py", line 165, in setup
return distutils.core.setup(
attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 254, in run
raise RuntimeError('Failed to build media files')
RuntimeError: Failed to build media files

david
#1 david

What version of nodejs do you have installed? I vaguely recall that the latest 14.x introduced some incompatibilities that some packages hadn't yet updated for.

  • -New
    +NeedInfo
Misery
#2 Misery

nodejs: 14.7.0
npm: 6.14.7

Misery
#3 Misery

Yeah, I downgraded nodejs to 12.18.3 (LTS) and it works.

david
#4 david

This just got fixed in release-4.0.x

  • -NeedInfo
    +Fixed