js-lingui: Compile/extract command doesn't work on Windows

Getting this error when running command to add a new locale:

$ lingui add-locale cs
fs.js:653
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\<projectDir>\locale\cs\messages.json'
    at Object.fs.openSync (fs.js:653:18)
    at Object.fs.writeFileSync (fs.js:1300:33)
    at Object.write (C:\<projectDir>\node_modules\lingui-cli\dist\api\formats\lingui.js:60:20)
    at Object.addLocale (C:\<projectDir>\node_modules\lingui-cli\dist\api\formats\lingui.js:162:14)
    at C:\<projectDir>\node_modules\lingui-cli\dist\lingui-add-locale.js:29:36
    at Array.map (<anonymous>)
    at command (C:\<projectDir>\node_modules\lingui-cli\dist\lingui-add-locale.js:28:25)
    at Object.<anonymous> (C:\<projectDir>\node_modules\lingui-cli\dist\lingui-add-locale.js:68:3)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
error Command failed with exit code 1.

lingui-cli 1.3.7 windows 10 (tried both from command prompt and git bash)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 27 (14 by maintainers)

Most upvoted comments

@XSlemX Uff, I really don’t understand how I missed that. Using lingui-cli for 6 months and never saw this error 😕

Dependencies are fixed in lingui-cli@1.3.13, thank you for debugging this!