Answer the question
In order to leave comments, you need to log in
How to create a file in the locales folder?
Hello, when I try to create a ru.json file in the locales folder (created with vue add i18n), I get an error like
warning in ./src/locales/ru.json
Module parse failed: Unexpected end of JSON input while parsing near ''
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
SyntaxError: Unexpected end of JSON input while parsing near ''
at JSON.parse (<anonymous>)
at parseJson (D:\Projects\temp_cli\node_modules\json-parse-better-errors\index.js:7:17)
at JsonParser.parse (D:\Projects\temp_cli\node_modules\webpack\lib\JsonParser.js:16:16)
at D:\Projects\temp_cli\node_modules\webpack\lib\NormalModule.js:482:32
at D:\Projects\temp_cli\node_modules\webpack\lib\NormalModule.js:358:12
at D:\Projects\temp_cli\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (D:\Projects\temp_cli\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array.<anonymous> (D:\Projects\temp_cli\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (D:\Projects\temp_cli\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at D:\Projects\temp_cli\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at D:\Projects\temp_cli\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:69:3)
@ ./src/locales sync [A-Za-z0-9-_,\s]+\.json$/
@ ./src/i18n.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.3.200:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question