You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vue ui (npm serve) messages unexpted error ENOENT: no such file or directory, scandir 'C:\MY\APP/src/locales'
I replaced the loadLocaleMessages() output of i18n.js with my translation.json.
Also note i18n.js contains semi-working code, see my comments to the code I paste in full below:
exportdefaultcreateI18n({legacy: false,globalInjection: true,// https://www.giters.com/intlify/vue-cli-plugin-i18n/issues/190 , the https://vue-i18n.intlify.dev/guide/advanced/composition.html way requires every component to be amended (= insane effort)locale: process.env.VUE_APP_I18N_LOCALE||"en",fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE||"en",// these have no effect on their own, they require vue.config.js to be set and then those values are applied but this has to be here for them to applymessages: loadLocaleMessages(),});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
the vue-i18n-loader does some things to a Vue 3 CLI project which I found no documentation for, eg. creating a
i18n.js
file.Inside the
i18n.js
file is a dead link: https://github.com/intlify/vue-i18n-loader#rocket-i18n-resource-pre-compilation.vue ui
(npm serve) messagesunexpted error ENOENT: no such file or directory, scandir 'C:\MY\APP/src/locales'
I replaced the
loadLocaleMessages()
output ofi18n.js
with my translation.json.Also note
i18n.js
contains semi-working code, see my comments to the code I paste in full below:Beta Was this translation helpful? Give feedback.
All reactions