Describe the bug
After installing @converse/headless module using npm, when I try to import the module over react application using
import converse from "@converse/headless/converse-core";
I got the error that indicates
Module not found: Can't resolve '../../locale' in 'C:......framework-pocnode_modules@converseheadless'
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:hiberfil.sys'
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:pagefile.sys'
Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:swapfile.sys'
To Reproduce
Steps to reproduce the behavior:
Create new react application and install @converse/headless using npx create-react-app and npm install.
Expected behavior
I expected to use converse object after I import it from the module.
Environment (please complete the following information):
Windows 10
Node v12.18.3
Converse.js 6.0.1
When I look into the @converse/headless module I can not see a folder named locale. So the code itself tries to reach an non-existing folder as far as i see.
Thanks for the bug report. This is indeed a problem.
The locale directory contains translation strings. Since the headless build doesn't have any UI, I think the general solution here is to not have any translatable strings inside the headless build.
I think this is feasible, but it means going through all the cases where translatable strings are used and figuring out how to move them out of the headless build.
I've given this some more thought. It'll be a lot of effort to try and remote the translations and resulting infrastructure from the headless build, and one can make a reasonable argument that it's appropriate (a feature!) to have the ability to translate strings inside the headless build.
So for now the compromise solution is IMO to also build a pot and po files for the headless build and then to make the path to the po file configurable.
Hi @jcbrand Please let us know When we can expect these fixes at npm repo as well?
Thanks
Thanks @jcbrand
You're welcome @maqsood1ahmed :)