Npm 尝试安装“;下一个&x201D;NativeScript的版本

Npm 尝试安装“;下一个&x201D;NativeScript的版本,npm,nativescript,Npm,Nativescript,我一直在尝试使用以下命令安装NativeScript的“下一个”版本 npm install -g nativescript@next 问题是我得到了以下错误: npm ERR! Refusing to delete /usr/local/bin/tns: ../lib/node_modules/nativescript/bin/nativescript.js symlink target is not controlled by npm /usr/local npm ERR! File ex

我一直在尝试使用以下命令安装NativeScript的“下一个”版本

npm install -g nativescript@next
问题是我得到了以下错误:

npm ERR! Refusing to delete /usr/local/bin/tns: ../lib/node_modules/nativescript/bin/nativescript.js symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/tns
npm ERR! Move it away, and try again.
有人知道会发生什么事吗?我尝试运行
npm uninstall-g nativescript
并重新组织安装,但最终还是遇到了同样的问题


任何帮助都将不胜感激。谢谢

那个文件的chmod呢<代码>/usr/local/bin/tns?什么权限?可能npm没有删除它的权限

不确定这对每个人都有效,但在我的情况下,我必须清除我的npm缓存。在我做了那件事之后,这件事神奇地起了作用

npm uninstall -g nativescript
npm cache clear
npm install -g nativescript

任务是
rwxr-xr-x
。奇怪的是,如果我通过
npm uninstall
卸载,
/usr/local/bin/tns
文件不再存在,这让我觉得这不是权限问题。不过我肯定是错的。而且
tns安装-g nativescript
工作正常。它只是
tns安装-gnativescript@next
失败,这意味着这可能是CLI本身的问题。