gridsome develop command fail when Contentful Entry title field contains only Japanese.
See original GitHub issueDescription
gridsome develop
command fail when Contentful Entry title field contains only Japanese.
Steps to reproduce
commands
gridsome create <project>
yarn add @gridsome/source-contentful
yarn develop
Contentful Model
Entity example
- title: ‘テスト’
- article: ‘test article’
Expected result
- successfully compiled.
Actual result
- error happened
fuuki@23:00:52 fuuki-blog $ yarn develop
yarn run v1.15.2
$ gridsome develop
Gridsome v0.5.5
Initialize - 0.19s
TypeError: Expected "slug" to match "[^\/]+?", but got ""
at Object.createPath (/Users/shigenaka/Documents/GitHub/fuuki-blog/node_modules/path-to-regexp/index.js:180:17)
at ContentTypeCollection._createPath (/<project-dir>/node_modules/gridsome/lib/app/ContentTypeCollection.js:309:25)
at ContentTypeCollection.addNode (/<project-dir>/node_modules/gridsome/lib/app/ContentTypeCollection.js:76:14)
at ContentfulSource.getEntries (/<project-dir>/node_modules/@gridsome/source-contentful/index.js:88:18)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Environment
- Libs
- gridsome version: 0.5.5
- @gridsome/cli version: 0.0.8
- Dependencies
"dependencies": {
"@gridsome/source-contentful": "^0.2.1",
"gridsome": "^0.5.0"
}
my awareness
- Error message says
slug
should not be empty. - In below code
this.slugify(node.title)
cuts Japanese charactors, and slug becomes empty.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Errors | Contentful
HTTP status code Error code Description
401 Unauthorized AccessTokenInvalid The authorization token was invalid.
422 Unprocessable Entity UnknownField The triggered query references an unknown...
422 Unprocessable...
Read more >gridsome/source-contentful
Contentful source for Gridsome. ... I start a new [Gridsome](https://gridsome.org) project, I have to go and set up SVG inlining. It's annoying having...
Read more >Syntax - Tasty Web Development Treats - Podcast Addict
Syntax - Tasty Web Development Treats - via Podcast Addict | Full Stack Developers Wes Bos and Scott Tolinski dive deep into web...
Read more >Remote API + Mobile + Security Jobs with great benefits and pay
... to $70000/year working as a Provider Referral Coordinator, Senior Customer Success Manager or Senior Software Developer FinTech. Last post 17 days.
Read more >Continue: Error Cleartext Not Permitted Android Studio - Scribd
Make sure that the path and file name are correct. catch (ArgumentNullException) ... in postman brute task manager mac chrome.debugger.sendcommand Input.
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 Free
Top 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
I don’t know the best solution, but Unidecode is one option to generate very rough ASCII transliterations of any text.
Thank you so much! In my model, this code behave fine.
However, slugify titles can cause failed builds to non-English titles, so I recommend to use an id for slug (or route) in the route configuration by default.