每当我运行包含 cabal-dev 的任何命令时,我都会收到以下错误:
cabal-dev:未找到命令
我已经从中下载了cabal-dev软件包
http://hackage.haskell.org/package/cabal-dev
但是没有关于如何安装它的说明。
答案 0 :(得分:1)
它与MacOS有关。这个命令解决了这个问题。
copyNshort = () => {
const bitly = new BitlyClient('...') // Generic Access Token bit.ly
let txt = document.getElementById('link-result')
bitly.shorten(txt.value)
.then((res) => {
this.setState({ shortedLink: res.url })
if (this.state.shortedLink !== undefined) {
document.getElementById('link-result-shorted').select() // get textarea value and select
document.execCommand('copy') // copy selected
console.log('The link has been shortened and copied to clipboard!')
ReactDOM.render(<i className="fas fa-clipboard-check"></i>, document.getElementById('copied'))
}
console.log('Shortened link ', res.url) // Shorted url
})
}