您好,登錄后才能下訂單哦!
本篇內容主要講解“怎么解決使用brew安裝yarn后node環境報錯問題”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“怎么解決使用brew安裝yarn后node環境報錯問題”吧!
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib Referenced from: /usr/local/opt/node@8/bin/node Reason: image not found
brew list # 查看安裝的軟件 brew uninstall --ignore-dependencies node icu4c # 卸載軟件 brew uninstall nvm #卸載nvm brew uninstall node[@8](https://my.oschina.net/u/147515) #卸載node[@8](https://my.oschina.net/u/147515) brew uninstall yarn #卸載 yarn 安裝軟件 brew install nvm ==> Caveats Please note that upstream has asked us to make explicit managing nvm via Homebrew is unsupported by them and you should check any problems against the standard nvm install method prior to reporting. You should create NVM's working directory if it doesn't exist: mkdir ~/.nvm Add the following to ~/.zshrc or your desired shell configuration file: export NVM_DIR="$HOME/.nvm" [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion You can set $NVM_DIR to any location, but leaving it unchanged from /usr/local/opt/nvm will destroy any nvm-installed Node installations upon upgrade/reinstall. Type `nvm help` for further information. Bash completion has been installed to: /usr/local/etc/bash_completion.d ==> Summary ???? /usr/local/Cellar/nvm/0.34.0: 7 files, 141.7KB, built in 8 seconds
根據提示,創建文件,配置參數
mkdir ~/.nvm Add the following to ~/.zshrc or your desired shell configuration file: export NVM_DIR="$HOME/.nvm" [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
再使用nvm 安裝node
~ nvm list N/A iojs -> N/A (default) node -> stable (-> N/A) (default) unstable -> N/A (default) nvm_list_aliases:36: no matches found: /Users/caonn/.nvm/alias/lts/* ? ~ nvm install v8.11.2 Downloading and installing node v8.11.2... Downloading https://nodejs.org/dist/v8.11.2/node-v8.11.2-darwin-x64.tar.xz... ######################################################################## 100.0% Computing checksum with shasum -a 256 Checksums matched! Now using node v8.11.2 (npm v5.6.0) Creating default alias: default -> v8.11.2 ? ~ node -v v8.11.2 ? ~ npm -v 5.6.0 ? ~
到此,相信大家對“怎么解決使用brew安裝yarn后node環境報錯問題”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。