New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: EPERM: operation not permitted, scandir 'C:/$Recycle.Bin/S-1-5-18' when running lingui extract #796
Comments
Hi @revskill10, this seems to be a problem with your configuration rather than with Lingui. The error clearly states that you don't have permission to read from
|
@tricoder42 I just followed |
Do you run |
I'm having the same issue on Windows 10. It seems to be only since we upgraded to version 3. Isn't it weird though that lingui is scanning the Recycling Bin when the default folder should be where the config file or the package.json is? Here is my lingui.config.js
When I console.log then entries that are sent to glob I get this
Something's gotta be wrong with the way Lingui resolves the paths or something right? |
Thanks @MaxEvan, that I suspect the bug is somewhere in js-lingui/packages/cli/src/api/catalog.ts Lines 307 to 392 in aff1d09
Another option is js-lingui/packages/cli/src/api/catalog.ts Lines 282 to 289 in aff1d09
Could you please print the |
I tried to log the things you asked for at line 280 but it didn't work because the code is breaking in the try catch at line 143. Here is the error message:
So it seems that it's trying to scan everything from C:\ and upwards somehow instead of just scanning starting from my root dir. |
Interesting. What if you try It's weird that there's no output at all. |
console.log(this.includes) as a first statement in collect method => undefined |
Released in 3.0.1. Consider donating using OpenCollective to support development and maintanence of this project 👍 |
I'm still having this issue using 3.1.0 :-( Windows seems unable to resolve the default rootDir. Using this instead works:
|
I'll take a look on this since I downloaded parallels yesterday to fix other issue |
Thank you @Snaptags for debugging, but it's still rather weird that CLI searches the root of |
Can the shell version have an influence here? I'm using PowerShell Core 7.0.3 |
I've tried with next-js example running: npx lingui extract or directly using yarn extract (with extract: lingui extract) on package.json, and couldn't replicate the issue. Powershell 5.1 and the standard windows terminal both worked. If you can provide me some extra details to replicate the issue I take a further look. |
I have the same behavior with cmd.exe, too. But I noticed that the catalog config is not the problem, but the default rootDir entry. Edited my first comment, because it was making false accusations :-)
But |
@semoal could you perhaps post your My current one is
|
With your config also fails for me on Windows, because rootDir "." goes to Windows homespace. Just removing it, works perfect on Powershell and normal cmd |
WITHOUT But if I copy the default config from https://lingui.js.org/ref/conf.html I'd still expect it to work. |
Yes, absolutely, i forgot to add i'm looking to fix that asap. |
I'd appreciate that. Unfortunately I could not narrow down the problem. But I'm happy to help if you need additional debugging output, etc. |
Markus, just to confirm that with this change is fixed. Can you change your
|
@Snaptags give a chance to 3.2.1 just published |
Thanks for fixing this, using 3.2.1 it works as expected. (Powershell Core and Ubuntu Bash) I'd still recommend using |
Or use the |
Describe the bug
Running
lingui extract
results in errorTo Reproduce
Use
next-js
example, and runlingui extract
Expected behavior
The command should run successfully.
3.0
@babel/core@7.7.7
.babelrc
):The text was updated successfully, but these errors were encountered: