-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutorial - Installing Node.js and npm for local WordPress development #1639
Comments
Love that this is happening. I remember my early days getting stuck figuring out what to do to get set up. |
This content is ready to be reviewed. Please follow the steps listed under Guidelines for reviewing content. Thank you for your contribution! ✨ |
Tutorial video for review: installing-nodejs-npm.mp4 |
Great, easy to follow tutorial @jonathanbossenger. I would maybe suggest brew in there as well? As that is available across windows, mac and Linux to install nvm and manage updates to nvm as well. |
@digitalchild thanks for the review.
For Windows, do you mean via WSL? I don't see any other way to install homebrew on Windows. While I agree that installing homebrew on Mac certainly makes things easier on a mac, I'm trying to limit the amount of things that need to be installed, especially for someone new to the terminal. Hence going with the one copy/paste command to install nvm on mac and Linux, and one copy/paste to install choco, and then one choco install command on Windows. Those that already have homebrew installed can probably manage all this without needing this beginner tutorial. |
I had set up a local dev environment for use with trunk a few months ago. |
@drussell17 thanks for the feedback
That's the reason I recommend installing nvm, so that one can then install and use node version 14 if one needs to set up WordPress trunk for any reason. It's also worth noting that the core team are working on updating the requirements to Node.js to 18 and npm to 9. |
Thanks for the response, that makes total sense. Are there any tutorials on using WSL, or maybe you could add some links in the tutorial resources? To WSL & Brew? |
Clearly explained, Jonathan! Learning outcomes are achieved. I like the fact that you have catered for various users. |
Not yet, but I am gathering data as to how valuable this would be. I'm of the opinion that installing and configuring WSL is a bit more of an "intermediate developer" thing, and at the moment I'm still focusing on the beginner-level content. |
Topic Description
Node.js is a cross-platform, open-source server environment that can run on most popular operating systems. Node.js lets developers use JavaScript to write command line tools and for server-side scripting. When you install Node.js on your operating system, it comes preinstalled with npm, a command line tool that allows developers to share and use software packages as dependencies in their own projects.
While not specifically a requirement for WordPress development, if you want to develop blocks, contribute to Gutenberg, or use modern tools like wp-env or wp-now, you will need to have Node.js and npm installed on your computer.
In this tutorial, you will learn how to install Node.js and npm on macOS, Ubuntu, and Windows.
Related Resources
Links to related content on Learn, HelpHub, DevHub, GitHub Gutenberg Issues, DevNotes, etc.
Guidelines
Review the team guidelines
Tutorial Development Checklist
The text was updated successfully, but these errors were encountered: