是什么导致此Macbook Pro上的nativescript安装错误

Joh*_*ird 1 nativescript

我已经安装,卸载,清理了npm缓存并重新安装。仍然出现以下错误并且是MacBook Pro的新手,我不知道发生了什么。

Johns-MBP:〜jbaird $ npm install -g nativescript npm警告可选的跳过可选依赖:abbrev@1.1.0(node_modules / nativescript / node_modules / fsevents / node_modules / abbrev):npm WARN enoent跳过可选的可选文件:ENOENT或目录,重命名为'/ usr / local / lib / node_modules / nativescript / node_modules / fsevents / node_modules / abbrev'->'/usr/local/lib/node_modules/nativescript/node_modules/fsevents/node_modules/.abbrev.DELETE'

npm ERR!路径/ usr / local / lib / node_modules / nativescript / node_modules / fsevents / node_modules / ansi-regex npm ERR!代码ENOENT npm ERR!errno -2 npm错误!syscall重命名npm ERR!enoent ENOENT:没有这样的文件或目录,请重命名'/ usr / local / lib / node_modules / nativescript / node_modules / fsevents / node_modules / ansi-regex'->'/ usr / local / lib / node_modules / nativescript / node_modules / fsevents / node_modules / .ansi-regex.DELETE'npm ERR!enoent这与npm无法找到文件有关。npm ERR!天生的

npm ERR!可以在以下位置找到该运行的完整日志:npm ERR!
/Users/jbaird/.npm/_logs/2017-08-24T14_34_26_019Z-debug.log Johns-MBP:〜jbaird $

dri*_*304 5

我有同样的问题。对我有用的是

sudo rm -rf /usr/local/lib/node_modules/nativescript
Run Code Online (Sandbox Code Playgroud)

然后 npm install nativescript -g