Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Added instructions for installing Node #2040

Merged
merged 4 commits into from
Dec 13, 2022
Merged

Added instructions for installing Node #2040

merged 4 commits into from
Dec 13, 2022

Conversation

rajdeepdas2000
Copy link
Contributor

Fixes

Fixes #2038 by @sarayourfriend

Description

Added instructions for installing volta, node and pnpm

Testing Instructions

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@rajdeepdas2000 rajdeepdas2000 requested a review from a team as a code owner December 12, 2022 14:29
@openverse-bot openverse-bot added ✨ goal: improvement Improvement to an existing user-facing feature 📄 aspect: text Concerns the textual material in the repository 🟨 priority: medium Not blocking but should be addressed soon labels Dec 12, 2022
README.md Outdated
Comment on lines 25 to 37
Before installing pnpm, make sure to switch to node versin 16:

```bash
node --version
```

If not 16, install node version 16 using:

```bash
nvm isntall 16
nvm use 16
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As described in the issue, we use volta to pin the Node version that we use for the project.

These instructions should read something like:

  1. Install node using Volta: volta install node@16
  2. Install pnpm using Volta: volta install pnpm
  3. Run volta run pnpm dev

These will be simplified soon once Volta fully supports pnpm, which should happen with the next Volta release: volta-cli/volta#737 (comment)

At that point the instructions can be reduced to simply volta run pnpm dev.

@sarayourfriend sarayourfriend changed the title Added instructions for installing volta Added instructions for installing Node Dec 12, 2022
Changed NODE installation instructions as per changes requested.
Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, except for one change I suggested inline.

README.md Outdated
@@ -33,7 +39,7 @@ Run the following commands in order to have the code up and running on your mach
```bash
# Builds and serves assets with hot-reload
# Automatically invokes pnpm install and pnpm i18n
pnpm dev
Run volta run pnpm dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Run volta run pnpm dev
volta run pnpm dev

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, @rajdeepdas2000 !

Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These instructions look good. I can't wait until pnpm is officially supported to make this simpler. Volta automaticaly symlinks the correct node version, but it only does its check to create the correct symlink the first time node or npm is evoked in a directory. So if someone has volta installed, clones the frontend, and runs a command likenode -v in the repo root, at that point volta will automatically install and symlink node v16.15.0 before evoking the command.

Once pnpm support is official, running pnpm dev will be sufficient to install and link the correct node version. At that time we can remove these instructions.

@obulat obulat dismissed sarayourfriend’s stale review December 13, 2022 19:43

The required changes were made

@obulat obulat merged commit e88dc48 into WordPress:main Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📄 aspect: text Concerns the textual material in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add instructions to use volta to install node in the READMe
5 participants