Thinkmill / keystatic

First class CMS experience, TypeScript API, Markdown & YAML/JSON based, no DB
https://keystatic.com
MIT License
1.22k stars 80 forks source link

npm create command fails (Invalid package name) #388

Open pReya opened 1 year ago

pReya commented 1 year ago

Tried to install Keystatic according to the Quick Start guide under this link:

https://keystatic.com/docs/quick-start

Tried running npm create @keystatic@latest and was greeted with this error:

➜  Code npm create @keystatic@latest
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "@keystatic" of package "@keystatic@latest/create": name can only contain URL-friendly characters.
BarnabyBishop commented 1 year ago

Hey @pReya, can you please let us know what version of npm you are using by running npm -v ?

pReya commented 1 year ago

Hey @pReya, can you please let us know what version of npm you are using by running npm -v ?

Sure. It's 8.6.0 – so I'm on node 18.

Thanks for pointing me in that direction. Using node 20 / npm 9 it works great. Maybe the required node version could be mentioned in the docs?

BarnabyBishop commented 1 year ago

Thanks for reporting back @pReya.

Oddly when I downgrade my node to 16 and npm version to 8 it still works, I have to drop to node 14/npm 6 for it to stop working.

➜ nvm use v16.13.1
Now using node v16.13.1 (npm v8.1.2)
➜ npm create @keystatic
┌  Keystatic — let's get you setup
│
│
│     +---+
│    /    |
│   /     +---+
│  +---      /
│      |    /
│      +---+
│

What OS are you using?

pReya commented 1 year ago

Sorry, my last comment was not correct. I assumed npm 8.6.0 is part of node 18 – which is wrong. It's actually part of node 17. So the command fails on node 17 and starts working on 18.