今是昨非

今是昨非

日出江花红胜火,春来江水绿如蓝

ArkTS installation failed.

Failed to Install ArkTS on Mac#

Error message:


Installing ArkTS dependencies...

Running 'npm install'...

npm ERR! code ETARGET

Reference: Failed to Install ArkTS, Need Help. The reason is that the node version is too high, and it needs to be downgraded.

Check the node version:

node -v

To downgrade node, first install nvm using brew:


brew install nvm

Then install a lower version of node using nvm:

nvm install v14.21.3

After the installation is complete, check the node version again. If the node version is still incorrect, run the following command:

nvm use v14.21.3

After downgrading node, clean the npm cache:

npm cache clean -f

Then restart DevEco-Studio and try installing again. This should successfully install ArkTS.

Reference#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.