brew install node Error: No such file or directory @ dir_chdir Bottle installation failed

Enter the brew installation node in the terminal and the carriage return error is shown below.

brew installation node
==>Dependencies on the installation node:icu4c
==>Installation node dependency:icu4c
==>
Downloaded:
/Users/lvhongjian/Library/Caches/Homebrew/downloads/ 2ac5137342effaf79e199fb1612ebce7842df443578bcd61afd73767858aef – icu4c-62.1. mojave.bottle.tar>gz
Error: no such file or directory @ dir_chdir – /usr/local/Cellar
Warning: bottle installation failed: build from source.
== than; Downloaded:
/Users/lvhongjian/Library/ cache /Homebrew/downloads/ b79f5dd51110fb1096e57fc35ba03df84f69142b0374bae8a0381edde5a80448-icu4c-62_1- src. tgz
Error:An exception occurred in a subprocess:Errno::EPRM:
Operation not allowed @ dir_s_mkdir – /usr/local/Cellar
solution

As the log in user is not a HomeBrew installer, the above error is solved as follows.
1. reinstall HomeBrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" on the current user.
2. run brew install node prompt successful


Read More: