centos中nodejs npm安装cordova

时间:2024-06-30 09:06:26

1、安装cordova

npm install -g cordova --registry https://registry.npm.taobao.org
npm install -g ionic --registry https://registry.npm.taobao.org

2、安装cordova插件热更新

npm install -g cordova-hot-code-push-cli --registry https://registry.npm.taobao.org

permission denied错误解决办法:先执行npm config set unsafe-perm=true
ngrok - downloading binary https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip
ngrok - error storing binary to local file { Error: EACCES: permission denied, open '/usr/local/node/lib/node_modules/cordova-hot-code-push-cli/node_modules/ngrok/bin/aHR0cHM6Ly9iaW4uZXF1aW5veC5pby9jLzRWbUR6QTdpYUhiL25ncm9rLXN0YWJsZS1saW51eC0zODYuemlw.zip'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/usr/local/node/lib/node_modules/cordova-hot-code-push-cli/node_modules/ngrok/bin/aHR0cHM6Ly9iaW4uZXF1aW5veC5pby9jLzRWbUR6QTdpYUhiL25ncm9rLXN0YWJsZS1saW51eC0zODYuemlw.zip' }
ngrok - install failed, retrying
ngrok - downloading binary https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip
ngrok - error storing binary to local file { Error: EACCES: permission denied, open '/usr/local/node/lib/node_modules/cordova-hot-code-push-cli/node_modules/ngrok/bin/aHR0cHM6Ly9iaW4uZXF1aW5veC5pby9jLzRWbUR6QTdpYUhiL25ncm9rLXN0YWJsZS1saW51eC0zODYuemlw.zip'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/usr/local/node/lib/node_modules/cordova-hot-code-push-cli/node_modules/ngrok/bin/aHR0cHM6Ly9iaW4uZXF1aW5veC5pby9jLzRWbUR6QTdpYUhiL25ncm9rLXN0YWJsZS1saW51eC0zODYuemlw.zip' }
ngrok - install failed, retrying