javascript - 为什么用mocha测试的时候提示说nodejs版本过低

 小峰哥2502868817 发布于 2022-10-31 11:06
  "scripts": {
    "test": "mocha"
  },
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "koa": "^2.2.0"
  },
  "devDependencies": {
    "mocha":"^3.2.0",
    "supertest": "3.0.0"
  }
 Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! koa-test@1.0.0 test: `mocha`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the koa-test@1.0.0 test script 'mocha'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the koa-test package,
npm ERR! not with npm itself.
 Tell the author that this fails on your system:
npm ERR!     mocha
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs koa-test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls koa-test
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/rennaiqian/.npm/_logs/2017-04-11T01_44_49_682Z-debug.log

一开始用yarn install后来出问题了使用的是npm install

1 个回答
  • 不是这个问题,这是npm排除自身错误的一个假设。
    你吧所有错误全部贴上来

    2022-10-31 23:06 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有