Which versions of the prismic-cli
do you have? You can try updating with:
npm install -global prismic-cli
Which versions of the prismic-cli
do you have? You can try updating with:
npm install -global prismic-cli
I'm installing latest version:
npx prismic-cli@latest theme --theme-url GitHub - prismicio/gatsby-multi-language-site: Multi-language project with Gatsby & Prismic --conf prismic-configuration.js
My version: prismic-cli/4.2.3 win32-x64 node-v18.9.1
Custom types haven't been updated in 3 years, could this be the problem?
The structure of the Custom Types hasn’t changed. They're all still valid.
I tested it again, and I could initialize the sample without any errors. Could you send us a screen-recording or screenshot of the errors you see in the terminal?
? Name your prismic repository: https://jat-prismic.prismic.io
project folder [jat-prismic]:
Downloading starter project... Download complete
? package manager npm
create jat-prismic\.env.example
create jat-prismic\.eslintrc.json
create jat-prismic\.gitignore
create jat-prismic\.prettierignore
create jat-prismic\.prettierrc
create jat-prismic\gatsby-browser.js
create jat-prismic\gatsby-config.js
create jat-prismic\gatsby-node.js
create jat-prismic\gatsby-ssr.js
create jat-prismic\package-lock.json
create jat-prismic\package.json
create jat-prismic\prismic-configuration.js
create jat-prismic\README.md
create jat-prismic\custom_types\homepage.json
create jat-prismic\custom_types\index.json
create jat-prismic\custom_types\page.json
create jat-prismic\custom_types\top_menu.json
create jat-prismic\documents\index.json
create jat-prismic\documents\en-us\Xs5M1hEAACEAImP9=#=Xs_kqBEAAArQKQMx=#=homepage=#=Xs5M1hEAACEAImP_=#=en-us=#=y.json
create jat-prismic\documents\en-us\Xs5rBhEAACEAIueu=#=Xs_k9REAACEAKQOv=#=page=#=Xs5rBhEAACEAIuew=#=en-us=#=y.json
create jat-prismic\documents\en-us\Xs5vWREAACYAIvvr=#=Xs5vWREAACYAIvvs=#=top_menu=#=Xs5vWREAACYAIvvt=#=en-us=#=y.json
create jat-prismic\documents\fr-fr\Xs5SSREAACQAInz5=#=Xs_kwBEAACEAKQNa=#=homepage=#=Xs5M1hEAACEAImP_=#=fr-fr=#=n.json
create jat-prismic\documents\fr-fr\Xs5ushEAACQAIvjn=#=Xs_k4REAACYAKQOR=#=page=#=Xs5rBhEAACEAIuew=#=fr-fr=#=n.json
create jat-prismic\documents\fr-fr\Xs5vkREAAArQIvz4=#=Xs5vkREAAArQIvz5=#=top_menu=#=Xs5vWREAACYAIvvt=#=fr-fr=#=n.json
create jat-prismic\src\components\Footer.js
create jat-prismic\src\components\GatsbyLink.js
create jat-prismic\src\components\LanguageSwitcher.js
create jat-prismic\src\components\Layout.js
create jat-prismic\src\components\TopMenu.js
create jat-prismic\src\images\facebook.png
create jat-prismic\src\images\favicon.png
create jat-prismic\src\images\full-width-image-background.png
create jat-prismic\src\images\instagram.png
create jat-prismic\src\images\logo.png
create jat-prismic\src\images\top-icon.png
create jat-prismic\src\images\twitter.png
create jat-prismic\src\pages\404.js
create jat-prismic\src\pages\preview.js
create jat-prismic\src\slices\EmailSignup.js
create jat-prismic\src\slices\FullWidthImage.js
create jat-prismic\src\slices\HeadlineWithButton.js
create jat-prismic\src\slices\index.js
create jat-prismic\src\slices\InfoWithImage.js
create jat-prismic\src\slices\TextInfo.js
create jat-prismic\src\stylesheets\main.scss
create jat-prismic\src\stylesheets\_variables.scss
create jat-prismic\src\templates\homepage.js
create jat-prismic\src\templates\page.js
create jat-prismic\src\utils\linkResolver.js
create jat-prismic\src\utils\prismicPreviews.js
create jat-prismic\src\stylesheets\base\_base.scss
create jat-prismic\src\stylesheets\base\_fonts.scss
create jat-prismic\src\stylesheets\base\_module.scss
create jat-prismic\src\stylesheets\base\_resetr.scss
create jat-prismic\src\stylesheets\base\_typography.scss
create jat-prismic\src\stylesheets\components\_footer.scss
create jat-prismic\src\stylesheets\components\_header.scss
create jat-prismic\src\stylesheets\components\_module.scss
create jat-prismic\src\stylesheets\pages\_404.scss
create jat-prismic\src\stylesheets\pages\_module.scss
create jat-prismic\src\stylesheets\components\slices\_email-signup.scss
create jat-prismic\src\stylesheets\components\slices\_full-width-image.scss
create jat-prismic\src\stylesheets\components\slices\_headline-with-button.scss
create jat-prismic\src\stylesheets\components\slices\_info-with-image.scss
create jat-prismic\src\stylesheets\components\slices\_text-info.scss
No change to package.json was detected. No package manager install will be executed.
creating prismic repository... Invalid custom types format
Prismic: Press any key to open up the browser to login or q to exit: npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN react@"^17.0.2" from the root project
npm WARN 25 more (@gatsbyjs/reach-router, @prismicio/react, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/gatsby/node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack@"0.0.0-experimental-c8b778b7f-20220825" from gatsby@4.25.4
npm WARN node_modules/gatsby
npm WARN
npm WARN Conflicting peer dependency: react@0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react
npm WARN peer react@"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/gatsby/node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack@"0.0.0-experimental-c8b778b7f-20220825" from gatsby@4.25.4
npm WARN node_modules/gatsby
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
added 1895 packages, and audited 1896 packages in 3m
236 packages are looking for funding
run `npm fund` for details
46 vulnerabilities (1 low, 22 moderate, 22 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
Opening browser to https://prismic.io/dashboard/cli/login?port=5555
Prismic: Logging in... Logged in as javier@domain.tld
creating prismic repository... Invalid custom types format
Prismic: Press any key to open up the browser to login or q to exit:
Opening browser to https://prismic.io/dashboard/cli/login?port=5555
Prismic: Logging in... Logged in as javier@domain.tld
creating prismic repository... Invalid custom types format
Prismic: Press any key to open up the browser to login or q to exit:
Is the repository being created after running the command?
If it isn't, you need to ensure you're login in correctly to your Prismic account in the terminal. You can run the following command:
prismic login
Yes, I'm properly logged:
Prismic: Logging in... Logged in as javier@domain.tld
*I've obviously changed my real email address here
Just so we are on the same page: a Gatsby local installation with necessary Prismic files is created, is the repo that never gets built.
Is is possible to somehow import the demo repo to a brand new one?
You could also move the Custom Types folder to a project and newly created repository. This involves doing a bit more work in the repository, but it works as a workaround.
Could you record the installation process so we can see it from start to finish? Maybe we could pinpoint the issue that way.
It's almost the same as posted before:
Thank you @javierllinas, this is very useful!
I'll share this with the Dev team and come back to you as soon as I have a better understanding of your case.
The theme command works correctly on my side. I do not see the same “Invalid custom types format” error. It doesn’t seem like an issue with Gatsby or the starter repo. It seems like an error within the CLI or the Prismic repo API. We'll monitor future use cases to better understand the root cause.
If you want to try out the sample without the command, you can do it. It requires some manual processes:
prismic-configuration.js
by renaming your-repo-name
to the name of your repository.custom_types/homepage.json
.Thanks, @Pau. Sorry I couldn't get back to you before.