Skip to content
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

Warning when langDir is not specified #27

Closed
lucpotage opened this issue Feb 20, 2018 · 2 comments
Closed

Warning when langDir is not specified #27

lucpotage opened this issue Feb 20, 2018 · 2 comments

Comments

@lucpotage
Copy link

lucpotage commented Feb 20, 2018

I got some warnings when using nuxt-i18n 2.3.0 with the last version of the starter template.

warning in ./static/robots.txt
Module parse failed: Unexpected token (1:10)
You may need an appropriate loader to handle this file type.
| User-agent: *
| Disallow: /

 @ . lazy ^\.\/.*$
 @ ./.nuxt/i18n.utils.js
 @ ./.nuxt/i18n.plugin.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js

I suspect this is due to the regex in the latest lazy loading feature. If you make an error in your configuration, let's say you don't specify the langDir property, then, you will get this error. Maybe, you could prompt a clearer message in such a case.

In async loading mode, if the language file does not exist, there is no error in the terminal.

Hope this can help improve this module.

This question is available on Nuxt.js community (#c14)
@lucpotage lucpotage changed the title Warning with Nuxt starter template Warning when langDir is not specified Feb 20, 2018
@paulgv
Copy link
Collaborator

paulgv commented Feb 21, 2018

Hi @lucpotage
This might be related to #28 and should be fixed in v2.3.2

@paulgv paulgv closed this as completed Feb 21, 2018
@ghost
Copy link

ghost commented Aug 11, 2018

This question has been resolved by @paulgv, see answer.

@ghost ghost added the cmty:status:resolved label Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants