Skip to content

Commit 9a1d027

Browse files
committed
Update new nodejs installation method in development_dependencies_install document.
Because the traditional `setup_XX.x` script is deprecated, and there is a need to migrate to the new installation method.
1 parent a6099ed commit 9a1d027

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

guides/source/development_dependencies_install.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,13 @@ $ sudo apt-get install sqlite3 libsqlite3-dev mysql-server libmysqlclient-dev po
123123

124124
# Install Yarn
125125
# Use this command if you do not have Node.js installed
126-
$ curl --fail --silent --show-error --location https://deb.nodesource.com/setup_18.x | sudo -E bash -
126+
# ref: https://github.com/nodesource/distributions#installation-instructions
127+
$ sudo mkdir -p /etc/apt/keyrings
128+
$ curl --fail --silent --show-error --location https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
129+
$ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
130+
$ sudo apt-get update
127131
$ sudo apt-get install -y nodejs
132+
128133
# Once you have installed Node.js, install the yarn npm package
129134
$ sudo npm install --global yarn
130135
```
@@ -138,8 +143,10 @@ $ sudo dnf install sqlite-devel sqlite-libs mysql-server mysql-devel postgresql-
138143

139144
# Install Yarn
140145
# Use this command if you do not have Node.js installed
141-
$ curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -
142-
$ sudo dnf install -y nodejs
146+
# ref: https://github.com/nodesource/distributions#installation-instructions-1
147+
$ sudo dnf install https://rpm.nodesource.com/pub_20/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
148+
$ sudo dnf install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1
149+
143150
# Once you have installed Node.js, install the yarn npm package
144151
$ sudo npm install --global yarn
145152
```

0 commit comments

Comments
 (0)