当我运行npm install --save-dev jest-cli
安装Jest时,我收到以下错误:
> jest-cli@0.10.0 postinstall /var/www/html/_learning/react/hacking-book/node_modules/jest-cli
> node postinstall.js
{ [Error: Command failed: /bin/sh -c ./setup.sh
/bin/sh: 1: ./setup.sh: not found
]
killed: false,
code: 127,
signal: null,
cmd: '/bin/sh -c ./setup.sh' }
我从jest GitHub repo(https://github.com/facebook/jest)下载了setup.sh
并手动运行。然后,我再次使用与上面相同的结果运行npm install
。如何安装Jest?