Error creating new project through CLI due to certificate verification issue
11 replies
Last updated: Jun 14, 2023
J
Hello,
Im creating a new project through the CLI and I'm having the following error:
This is the commands and configurations used:
Im creating a new project through the CLI and I'm having the following error:
Error: unable to verify the first certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1568:34) at TLSSocket.emit (node:events:511:28) at TLSSocket._finishInit (node:_tls_wrap:985:8) at ssl.onhandshakedone (node:_tls_wrap:771:12)
β― npm -y create sanity@latest You're setting up a new project! We'll make sure you have an account with <http://Sanity.io|Sanity.io>. Then we'll install an open-source JS content editor that connects to the real-time hosted API on <http://Sanity.io|Sanity.io>. Hang on. Press ctrl + C at any time to quit. Prefer web interfaces to terminals? You can also set up best practice Sanity projects with your favorite frontends on <https://www.sanity.io/templates> Looks like you already have a Sanity-account. Sweet! β Fetching existing projects ? Select project to use Create new project ? Your project name: ###### ? Select organization to attach project to Mezcal Trascendente [######] Your content will be stored in a dataset that can be public or private, depending on whether you want to query your content with or without authentication. The default dataset configuration has a public dataset named "production". ? Use the default dataset configuration? Yes β Creating dataset ? Project output path: /###### ? Select project template Clean project with no predefined schemas ? Do you want to use TypeScript? Yes β Bootstrapping files from template β Resolving latest module versions
Jun 12, 2023, 6:40 PM
R
π Does this error happen during the
Resolving latest module versionsstep?
Jun 12, 2023, 6:50 PM
J
yes
Jun 12, 2023, 6:50 PM
R
What version of Node and NPM are you running? What OS are you using?
Jun 12, 2023, 6:50 PM
J
β― npm --v 8.5.0 β― node --version v16.14.2
Jun 12, 2023, 6:53 PM
R
You may want to upgrade npm to the latest stable version.
Jun 12, 2023, 6:56 PM
J
upgraded my system to:
Will try again
β― node --version v20.3.0 β― npm --v 9.6.7
Jun 12, 2023, 7:35 PM
J
β― sanity init βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β Welcome to Sanity! Looks like you're following instructions for Sanity Studio v2, β β but the version you have installed is the latest, Sanity Studio v3. β β In Sanity Studio v3, new projects are created with [npm create sanity@latest]. β β β β Learn more about Sanity Studio v3: <https://www.sanity.io/help/studio-v2-vs-v3> β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ? Continue creating a Sanity Studio v3 project? (Y/n) Γ§Γ§Γ§Γ§ β― β― β― npm create sanity@latest Need to install the following packages: create-sanity@3.12.0
Jun 12, 2023, 10:13 PM
J
the last line is very weird
Jun 12, 2023, 10:13 PM
J
returned to
sanity initand it worked. The other command is asking me to install the other dependency that I'd never used
Jun 12, 2023, 10:17 PM
R
Ah, thatβs required as part of the process to create a V3 studio.
Jun 12, 2023, 11:30 PM
J
should I installed it globally?
Jun 14, 2023, 5:46 PM
Sanityβ build remarkable experiences at scale
The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.