yarn安装及node升级

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])

  

扫描二维码关注公众号,回复: 2972041 查看本文章

也可以指定版本

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

猜你喜欢

转载自www.cnblogs.com/crac/p/9563469.html
今日推荐