'How to create multi examples with create-next-app
I'm using this in order to create an Next app
https://open.segment.com/create-next-app/
but I'm facing this:
create-next-app --example with-next-i18next with-next-sass with-next-seo next-learn
I got this error
Could not locate an example named "with-next-i18next". Please check your spelling and try again.
but I want multiple examples, is that possible?
thanks in advance Carlos Vieira
Solution 1:[1]
Two things here:
The error is because
with-next-i18nextis unknown to create-next-app. If you know where to find the template, you can use the URL to the Github repository with:create-next-app --example [github-url].About using multiple examples: as of August 2020 it was not possible to use multiple examples with
create-next-app.
Solution 2:[2]
Make sure you use at least Node 12. On Node 10 I had the same error ("Could not locate an example named X...") on every example initialisation, switching to Node 12 solved the problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Aurelien |
| Solution 2 | Paul Walczewski |
