0
我試圖使用vs-mda-remote在我的Mac上從Visual Studio遠程構建我的Cordova應用程序。如何在遠程cordova安裝需要sudo時vs-mda-remote?
儘管已經在Mac上全局安裝了NPM(使用Sudo),但Visual Studio遠程構建仍嘗試在Mac上再次安裝它。這個失敗是因爲你不能使用Sudo來運行vs-mda-remote(它會立即出錯並退出),並且Cordova的安裝需要root(至少在我的Mac的配置中)。
我在做什麼錯?
> ------ Remote build log follows
1> 4.3.0
1> Installing Cordova tools {0} for project from NPM. This could take a few minutes... [email protected]
1>
1>MDAVSCLI : npm WARN locking error : EACCES, open '/Users/halexanderw/.npm/_locks/cordova-b6c5e32b0cf25697.lock'
1> npm WARN locking at Error (native)
1> npm WARN locking /Users/halexanderw/.npm/_locks/cordova-b6c5e32b0cf25697.lock failed { [Error: EACCES, open '/Users/halexanderw/.npm/_locks/cordova-b6c5e32b0cf25697.lock']
1> npm WARN locking errno: -13,
1> npm WARN locking code: 'EACCES',
1> npm WARN locking path: '/Users/halexanderw/.npm/_locks/cordova-b6c5e32b0cf25697.lock' }
1> npm ERR! Darwin 14.3.0
1> npm ERR! argv "node" "/usr/local/bin/npm" "install" "[email protected]"
1> npm ERR! node v0.12.5
1> npm ERR! npm v2.11.2
1>
1> npm ERR! Attempt to unlock /Users/halexanderw/remote-builds/node_modules/cordova/4.3.0/node_modules/cordova, which hasn't been locked