Error while creating python package for extension

I am trying to create a Python package for my extension using Python build tool but I am facing the following error while generating the package:

installing to build\\wheel
running install
running install_lib
running install_data
copying myextension\labextension\static\ -> build\\wheel\\data\share\jupyter\labextensions\myextension\static
copying myextension\labextension\static\style.js -> build\\wheel\\data\share\jupyter\labextensions\myextension\static
copying myextension\labextension\static\vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runtime_cssW-7d5e6f.bdafcc2936bf2afb8035.js -> build\\wheel\\data\share\jupyter\labextensions\myextension\static
error: could not create 'build\\wheel\\data\share\jupyter\labextensions\myextension\static\vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runtime_cssW-7d5e6f.bdafcc2936bf2afb8035.js': No such file or directory

ERROR Backend subprocess exited when trying to invoke build_wheel

The strane thing is that the file that it complains is already present in this directory:

Can someone help me fix this issue?

Is it possible you’re running into the maximum path length on Windows?

I was able to solve this issue by cleaning my environment using this command jlpm clean:all and then creating the package using python -m build command. I am not sure if it’s the path length issue or maybe another locking issue holding up the file.