全局安装的Jest无法识别为内部或外部命令

时间:2018-07-17 14:05:27

标签: npm jestjs

我使用npm i -g jest在全球范围内安装jest和jest-cli。但是,当我尝试运行npm test命令时,得到以下信息:

'jest' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Test failed.  See above for more details.

package.json:

"scripts": {
    "webpack": "webpack -wd",
    "test": "jest --watch"
  },

我检查了npm全局目录C:\Users\<User>\AppData\Roaming\npm\node_modules并安装了Jest。

0 个答案:

没有答案