1. 程式人生 > >yarn安裝及node升級

yarn安裝及node升級

exp key install match yarn err http uil 1.9

ERROR:

root@debian:/home/test/keygen-radio-master/scripts# npm install -g yarn
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
[email protected] /usr/local/lib/node_modules/yarn

  

apt-get install npm

建議先裝n,再用n把node升級到最新穩定版
$ npm install -g n

root@debian:/home/test/keygen-radio-master/scripts# npm install -g n
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
[email protected] /usr/local/lib/node_modules/n

  


$ n stable

root@debian:/home/test/keygen-radio-master/scripts# n stable

     install : node-v10.8.0
       mkdir : /usr/local/n/versions/node/10.8.0
       fetch : https://nodejs.org/dist/v10.8.0/node-v10.8.0-linux-x64.tar.gz
######################################################################## 100.0%
   installed : v10.8.0

npm install -g cordova@4

npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: The major version is no longer supported. Please update to 4.x or newer
npm WARN deprecated [email protected]: This package is discontinued. Use lodash@^4.0.0.
npm WARN engine [email protected]: wanted: {"node":">=0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
[email protected] /usr/local/lib/node_modules/cordova
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

  

也可以指定版本

n 6.9.1

root@debian:/home/test/keygen-radio-master/scripts# n 6.9.1

     install : node-v6.9.1
       mkdir : /usr/local/n/versions/node/6.9.1
       fetch : https://nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.gz
######################################################################## 100.0%
   installed : v6.9.1

需要重啟,重啟後:

npm install -g yarn

yarn build

yarn start

yarn安裝及node升級