-
Notifications
You must be signed in to change notification settings - Fork 87
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
2.0.5: [vue-i18n-extract] Error: vueFiles glob has no files. #159
Comments
I didn't specifically, but I did update the glob package which might have changed the syntax? |
Same problem with
|
Same problem here |
2.0.4 use glob ^7.1.6, 2.0.6 use glob ^8.0.1, and then Error: vueFiles glob has no files. |
I think I have a theory that explains these issues. The call to
receives the result of
where require('glob').sync(
require('path').resolve(process.cwd(), "./src/**/*.?(js|vue)")
) According to node-glob: changelog.md: 8.0:
On Windows, the following will result in a string containing two backslashes as path separators (i.e. require('path').resolve(process.cwd(), "./src/**/*.?(js|vue)") A naive fix for this could be to add something like I’m happy to file a pull request for this if that is indeed the case. |
I am sorry to say that this problem has not yet been solved on Windows with the latest version |
@mreduar What’s the issue that’s occurring for you? Do you get any error messages? |
Yes, the error message is as follows.
It should be noted that I have to use this command, because if I use it the way the readme example (with Edit:I have downloaded the repository and performed some tests. I have done the test with only one file, placing only that file with the relative path, so I modified the script in And the error remains the same.
I have checked that the path |
@mreduar Hey there, After node ./bin/vue-i18n-extract.js report --vueFiles ./tests/fixtures/vue-files/Basic.vue --languageFiles './tests/fixtures/lang/**/*.?(json)' On my machine, the two paths logged are these (I use Ubuntu): {
src: '/home/phil/dev/packages/vue-i18n-extract/tests/fixtures/vue-files/Basic.vue',
normalizedSrc: '/home/phil/dev/packages/vue-i18n-extract/tests/fixtures/vue-files/Basic.vue'
} In your case, I would expect the two to look like this: {
src: 'C:\\Users\\Eduar\\Projects\\my_project\\node_modules\\vue-i18n-extract\\tests\\fixtures\\vue-files\\Basic.vue',
normalizedSrc: 'C:/Users/Eduar/Projects/my_project/node_modules/vue-i18n-extract/tests/fixtures/vue-files/Basic.vue'
} If that is indeed the result that you’re getting, can you please tell us which version of In case this doesn’t lead to any useful results, you can also try and perform like this some specific tests around the glob package by running const glob = require('glob')
glob.sync('C:/Users/Eduar/Projects/my_project/node_modules/vue-i18n-extract/tests/fixtures/vue-files/Basic.vue') That should yield results. |
I suspected it from the beginning, but I wasn't sure since I have no experience with javascript packages. My suspicion was that the files inside
|
@mreduar Aha! That explains it. Yes, the files in the That means the fix is working for you then? |
@kleinfreund Yes, the solution in PR #166 works if I do the compilation in the package, however in the project I am using the package does not work as it needs to have the latest changes in dist I guess. |
Thank you so much @kleinfreund! |
I also meet this error in version 2.0.7,I'm use windows 10. so, fix this error need remove the quotation mark for vueFiles and languageFiles argument. this cmd will work: |
my window 11: fix done |
Will not work on windows. |
Please fix this issue. We are not able to define multiple folders or a single /src folders. |
Since today, my npm run script is not working anymore, it throws a error about
vueFiles glob has no files.
.I see there was a release 2.0.5 yesterday.
2.0.4 works perfectly fine.
My config file has:
vueFiles: "./src/**/*.?(ts|js|vue)",
Did you change something on the files matcher since 2.0.4?
My workaround for now is, to execute your 2.0.4 version:
"i18n:reportDeOnly": "npx [email protected] --languageFiles ./src/locales/de-CH.json",
The text was updated successfully, but these errors were encountered: