簡體   English   中英

nativescript不會在MacOS上安裝

[英]nativescript won't install on MacOS

我已經按照nativescripts網站上的安裝說明對命令'sudo npm install -g nativescript'進行了操作,但出現此錯誤消息

    sudo npm i -g nativescript
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev@1.1.0 (node_modules/nativescript/node_modules/fsevents/node_modules/abbrev):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/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! path /usr/local/lib/node_modules/nativescript/node_modules/fsevents/node_modules/ansi-regex
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/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 This is related to npm not being able to find a file.
npm ERR! enoent 

任何和所有幫助都將得到贊賞

請嘗試以下操作:

sudo npm cache clean
sudo npm install nativescript -g

如果那不起作用,請嘗試首先卸載:

sudo npm uninstall nativescript -g
sudo npm install nativescript -g

如果那不起作用,請刪除本機腳本目錄並重新安裝:

sudo rm -rf /usr/local/lib/node_modules/nativescript
sudo npm install nativescript -g

其中之一應該解決它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM