Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As long as you have npm installed it'll work. Npm create is an alias for the npm init command [1], which will look for a package with the prefix 'create-', install it, and run its bin file. It looks like this is the file that ends up being run: https://github.com/withastro/astro/blob/main/packages/create....

[1] https://docs.npmjs.com/cli/v8/commands/npm-init



> As long as you have npm installed it'll work.

Exactly proving my original point.


Well obviously you'll need npm to use a command that begins with npm. If someone gave you a terminal command to run that begins with curl, you'd be expected to have curl installed. This seems like pure pedantry.

Take a look for example at the rust installation steps [1]. They tell you to run the following command in your terminal: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh". They don't tell you to first make sure you have curl installed (or sh for that matter).

[1] https://www.rust-lang.org/learn/get-started


If you don't have npm installed, just stay as far as you can from this :D

Seriously, JS static website generators are the worst... use something written in any compiled language so you just download and run a single binary, no messing around with npm and millions of dependencies.

Take your pick here: https://jamstack.org/generators/


PHP is pretty great. No NPM needed


PECL? PEAR? Composer? ...


Exactly. PHP (like every other modern programming language) has its own dependency management tools. Node is actually better than many in this respect because npm comes bundled with Node — it's not something you have to install separately.

Ironically, Composer actually lists npm as one of its inspirations [1].

> "...Composer is strongly inspired by node's npm and ruby's bundler."

[1] https://getcomposer.org/doc/00-intro.md




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: