Cannot read property 'iso' of undefined
See original GitHub issueIMPORTANT: Please use the following link to create a new issue:
https://nuxtjs.cmty.io/issues/new?repo=nuxt-community%2Fnuxt-i18n
If your issue was not created using the app above, it will be closed immediately.
^ I am not handing this site a token for my github account.
i’m getting the error
Cannot read property 'iso' of undefined
i’d like to know which iso you are using there is es
of the iso and es-ES
soooooo which is it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15
Top Results From Across the Web
Cannot read property 'iso' of undefined · Issue #80 - GitHub
One way to fix it would potentially be to add code to resolve route by path. If user visits non-existing route like /about...
Read more >Getting cannot read properties of undefined error when trying ...
The problem in your code is map is returning an array of promise instead of data. You can do sth like this:
Read more >NFS ISO: Cannot read property 'Export' of undefined - XCP-ng
Running the latest openSUSE Leap 15.4 as my IT Workstation to manage both my XCO-ng servers, etc,... and my NFS exports file look...
Read more >Options - i18n-module
Here are all the options available when configuring the module and their default values:
Read more >Re: [dc.js users] Cannot read property 'getFullYear' of null
I keep getting the message error "Cannot read property 'getFullYear' of null" coming from the d3.js file: Here is the html code (index.html):....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve looked a bit at the code.
With default strategy (
prefix_except_default
), with two pages:index.vue
andabout.vue
, these routes are generated:As there is no
/about
route being generated, the whole redirection logic fails because it can only redirect from existing routes due to needing route’s name to properly resolve current route and route to redirect to.The behavior is slightly different whether it’s first redirect in the app or subsequent. On first it will redirect from unknown route to
index
. After that, when cookie is already set, it will just fail with error above (unlessalwaysRedirect: true
I guess).It’s IMO also buggy that on first redirect it will redirect to index. It should probably just trigger 404 if it can’t figure out which route to redirect to.
One way to fix it would potentially be to add code to resolve route by path. If user visits non-existing route like
/about
, we would add defaultLocale prefix and try to resolve by path. But then when user visits/xx/about
, maybe we should strip the ‘xx’ prefix and then add default locale. Not sure how smart it would need to be.BTW. The root issue seems to stem from bad redirection logic but it would be easy to foolproof the code that is failing (in seo-head.js) to not fail in this case.
@begueradj You probably missed to encapsulate the module in an array. You can find more details on the issue here: https://github.com/nuxt-community/google-adsense-module/issues/13#issuecomment-397820366