mac node 18切换到node 12

yshuqdeMacBook-Pro:admin-platform-vue yshuq$ node --version
v18.18.0
npm view node versions
[
  '0.0.0',    '0.1.14',   '0.1.15',   '0.1.16',  '0.1.17',  '0.1.18',
  '0.1.19',   '0.1.20',   '0.1.21',   '0.1.22',  '0.1.23',  '0.1.24',
  '0.1.25',   '0.1.26',   '0.1.27',   '0.1.28',  '0.1.29',  '0.1.30',
  '0.1.31',   '0.1.32',   '0.1.33',   '0.1.90',  '0.1.91',  '0.1.92',
  。。。。。。。。。。
    '20.4.0',  '20.5.0',  '20.5.1',
  '20.6.0',   '20.6.1',   '20.7.0',   '20.8.0',  '20.8.1',  '20.9.0',
  '20.10.0',  '21.0.0',   '21.1.0',   '21.2.0'
]
yshuqdeMacBook-Pro:admin-platform-vue yshuq$ sudo npm install -g n
Password:

added 1 package in 3s
You have new mail in /var/mail/yshuq
yshuqdeMacBook-Pro:admin-platform-vue yshuq$ node --version
v18.18.0
yshuqdeMacBook-Pro:admin-platform-vue yshuq$ sudo n 12.0.0
  installing : node-v12.0.0
       mkdir : /usr/local/n/versions/node/12.0.0
       fetch : https://nodejs.org/dist/v12.0.0/node-v12.0.0-darwin-x64.tar.xz
     copying : node/12.0.0
   installed : v12.0.0 (with npm 6.9.0)
yshuqdeMacBook-Pro:admin-platform-vue yshuq$ node -v
v12.0.0

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注