This is a very weird one

If you type
pacopts aur -s libc++
libc++abi 6.0 is clearly in the list
aur/libc++abi 6.0.0-1 (156, 18.80)
    Low level support for the LLVM C++ standard library.
But if you type
pacopts aur -s libc++abi
it doesn't find anything

When installing discord it firstly installs libc++, but can't resolve its dependency (libc++abi)

How can I solve this?

P.S.
pacopts aur -I libc++abi
doesn't work.
the answer must be in why does it return so many results with libc++, the same as with just libc.
yaourt libc++abi does give a result, but libc++ gives the same with pacopts

So I suspect you found a bug in pacopts, try yaourt :)
% pacopts aur -i "libc++abi"
info :: libc++abi

Repository     : aur
Name           : libc++abi
PackageBase    : libc++
Version        : 6.0.0-1
URL            : https://libcxx.llvm.org/
AUR Page       : https://aur.archlinux.org/packages/libc++abi
Depends On     : gcc-libs  
Makedepends    : clang  cmake  ninja  python  libunwind  
License        : MIT  custom:University of Illinois/NCSA Open Source License  
Votes          : 156
Popularity     : 18.65
Out of Date    : No
Maintainer     : WoefulDerelict
Submitted      : Sat 04 Feb 2017 06:09:37 PM EET
Last Modified  : Wed 21 Mar 2018 06:20:57 AM EET
Description    : Low level support for the LLVM C++ standard library.
if you take a look on the PKGBUILD of libcc++ you will find the libc++abi as splitted package. So, if you want to build and install libc++abi you must build libc++ then install libc++abi with pacman.

The trouble do not come from pacopts but from cower itself. if you do cower -s libc++abi you will not see any result.
So first build libc++ with pacopts -i libc++, install libc++abi and libc++ with pacman -U then install discord with pacopts -I discord
Thanks Eric, this worked! :)

for completion:
pacopts aur -b libc++
to build libc++, on my system it builds it in /tmp/libc++

you change to that directory and
sudo pacman -U libc++abi-6.0.0-1-x86_64.pkg.tar.xz libc++-6.0.0-1-x86_64.pkg.tar.xz
then
pacopts aur -I discord
parfait :D
the answer must be in why does it return so many results with libc++, the same as with just libc.
yaourt libc++abi does give a result, but libc++ gives the same with pacopts
yeah I probably try out another aur helper, but so far pacopts worked out of the box, which is very convenient. Yaourt is not recommended at all on https://wiki.archlinux.org/index.php/AUR_helpers
Ok, I used pacopts to upgrade a large AUR pkg, it failed the 1st time after a long long compiling session, at the su password, so I tried again with user password, it failed again (at the end of the compiling and building), then the 3 rd time I used the user pass again. Nothing! Just failed to "validate".
So I did the same with yaourt, it found the precompiled pkg in /tmp, and installed it. EASY!!
If I ever discover for myself what yaourt is that it is so bad I will stop using it. Till then ..!
Arch people wrote this long ago .... my yaourt has been running like a swiss clock (a cuckoo clock).
yeah as long as you are satisfied it's cool.

Powered by Obarun