小编use*_*845的帖子

在nodejs中执行mocha测试的npm测试时,'make'不被识别为内部或外部命令

执行mocha npm测试时遇到以下问题

'make'不被识别为内部或外部命令,可操作程序或批处理文件.错误的ERR!奇怪的错误1 npm ERR!不好的代码0

makefile:
 test:
   ./node_modules/.bin/mocha \
     --reporter list

 .PHONY: test

package.json

{
  "name": "application-name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app.js",
    "test": "make test"
  },
  "dependencies": {
    "express": "3.3.4",
    "jade": "*",
    "mongoose": ">= 2.6.5",
    "nodemailer": "0.3.20",
    "connect": ">= 1.9.1",
    "socket.io": "~0.9",
    "cookie": "0.0.4",
    "kue" : "*",
    "async" : "*",
    "mocha": "*",
    "should" : "*",
    "winston" : "*"
  }
}
Run Code Online (Sandbox Code Playgroud)

mocha.js node.js

2
推荐指数
1
解决办法
2737
查看次数

标签 统计

mocha.js ×1

node.js ×1