The translate command does not work if the package is installed locally.
Steps to reproduce
Init project with Vue CLI 3
Select Babel only
Install and configure vue-i18n
Install vue-translation-manager locally with npm
Add the configuration file .vue-translation.js (copy from your documentation)
Run ./node_modules/.bin/vue-translation-manager translate
Choose the HelloWorld.vue component
I get the following error:
(node:19485) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '../../src/components/HelloWorld.vue'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at TranslationManager.getTemplateForSingleFileComponent (node_modules/vue-translation-manager/index.js:53:23)
at TranslationManager.getStringsForComponent (node_modules/vue-translation-manager/index.js:69:29)
at prompt.then (node_modules/vue-translation-manager/bin.js:155:27)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:19485) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:19485) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The
translate
command does not work if the package is installed locally.Steps to reproduce
.vue-translation.js
(copy from your documentation)./node_modules/.bin/vue-translation-manager translate
I get the following error: (node:19485) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '../../src/components/HelloWorld.vue' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at TranslationManager.getTemplateForSingleFileComponent (node_modules/vue-translation-manager/index.js:53:23) at TranslationManager.getStringsForComponent (node_modules/vue-translation-manager/index.js:69:29) at prompt.then (node_modules/vue-translation-manager/bin.js:155:27) at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:19485) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:19485) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.