ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

build/python: got compilation error on setup.py

Open Dentrax opened this issue 2 years ago • 0 comments

I was trying to compile python package on main branch but ran into a compilation error:

ℹ️  aarch64   | src/manager.ts(19,8): error TS2307: Cannot find module '@jupyter-widgets/base-manager' or its corresponding type declarations.
ℹ️  aarch64   | src/manager.ts(83,38): error TS2339: Property 'comm_target_name' does not exist on type 'LabWidgetManager'.
ℹ️  aarch64   | src/manager.ts(87,40): error TS2339: Property 'comm_target_name' does not exist on type 'LabWidgetManager'.
ℹ️  aarch64   | src/manager.ts(142,25): error TS2339: Property 'comm_target_name' does not exist on type 'LabWidgetManager'.
ℹ️  aarch64   | src/manager.ts(315,16): error TS2551: Property 'handle_comm_open' does not exist on type 'LabWidgetManager'. Did you mean '_handleCommOpen'?
ℹ️  aarch64   | src/manager.ts(531,20): error TS2339: Property 'filterExistingModelState' does not exist on type 'WidgetManager'.
ℹ️  aarch64   | src/manager.ts(532,18): error TS2339: Property 'set_state' does not exist on type 'WidgetManager'.
ℹ️  aarch64   | src/renderer.ts(57,31): error TS2339: Property 'get_model' does not exist on type 'LabWidgetManager'.
ℹ️  aarch64   | src/renderer.ts(77,31): error TS2339: Property 'create_view' does not exist on type 'LabWidgetManager'.
ℹ️  aarch64   | src/output.ts(120,3): error TS2416: Property 'widget_manager' in type 'OutputModel' is not assignable to the same property in base type 'OutputModel'.
ℹ️  aarch64   |   Type 'LabWidgetManager' is missing the following properties from type 'IWidgetManager': get_model, has_model, new_widget, new_model, and 2 more.
ℹ️  aarch64   | src/output.ts(128,56): error TS2322: Type 'this' is not assignable to type 'DOMWidgetView'.
ℹ️  aarch64   |   Type 'OutputView' is not assignable to type 'DOMWidgetView'.
ℹ️  aarch64   |     Types of property 'model' are incompatible.
ℹ️  aarch64   |       Type 'OutputModel' is not assignable to type 'WidgetModel'.
ℹ️  aarch64   | src/output.ts(168,3): error TS2416: Property 'model' in type 'OutputView' is not assignable to the same property in base type 'OutputView'.
ℹ️  aarch64   |   Type 'OutputModel' is not assignable to type 'WidgetModel'.
ℹ️  aarch64   |     Types of property 'widget_manager' are incompatible.
ℹ️  aarch64   |       Type 'LabWidgetManager' is not assignable to type 'IWidgetManager'.
ℹ️  aarch64   | src/plugin.ts(368,18): error TS2322: Type 'typeof OutputModel' is not assignable to type 'typeof WidgetModel | typeof WidgetView'.
ℹ️  aarch64   |   Types of construct signatures are incompatible.
ℹ️  aarch64   |     Type 'new (attributes?: any, options?: any) => OutputModel' is not assignable to type 'new (attributes?: any, options?: any) => WidgetModel'.
ℹ️  aarch64   |       Type 'OutputModel' is not assignable to type 'WidgetModel'.
ℹ️  aarch64   | src/plugin.ts(368,31): error TS2322: Type 'typeof OutputView' is not assignable to type 'typeof WidgetModel | typeof WidgetView'.
ℹ️  aarch64   |   Type 'typeof OutputView' is missing the following properties from type 'typeof WidgetModel': _deserialize_state, serializers
⚠️  aarch64   | Traceback (most recent call last):
⚠️  aarch64   |   File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
⚠️  aarch64   |     main()
⚠️  aarch64   |   File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
⚠️  aarch64   |     json_out['return_val'] = hook(**hook_input['kwargs'])
⚠️  aarch64   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
⚠️  aarch64   |   File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 304, in build_sdist
⚠️  aarch64   |     return backend.build_sdist(sdist_directory, config_settings)
⚠️  aarch64   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
⚠️  aarch64   |   File "/tmp/build-env-8hquixe6/lib/python3.11/site-packages/jupyter_packaging/build_api.py", line 36, in build_sdist
⚠️  aarch64   |     builder()
⚠️  aarch64   |   File "/tmp/build-env-8hquixe6/lib/python3.11/site-packages/jupyter_packaging/setupbase.py", line 233, in builder
⚠️  aarch64   |     run(npm_cmd + ["run", build_cmd], cwd=node_package)
⚠️  aarch64   |   File "/tmp/build-env-8hquixe6/lib/python3.11/site-packages/jupyter_packaging/setupbase.py", line 297, in run
⚠️  aarch64   |     return subprocess.check_call(cmd, **kwargs)
⚠️  aarch64   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
⚠️  aarch64   |   File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
⚠️  aarch64   |     raise CalledProcessError(retcode, cmd)
⚠️  aarch64   | subprocess.CalledProcessError: Command '['/tmp/build-env-8hquixe6/bin/jlpm', 'run', 'build:prod']' returned non-zero exit status 2.

I don't understand what the actually error is, so dropping here in case you may any idea about that. Thanks.

Dentrax avatar Oct 04 '23 20:10 Dentrax