javascript - 為什么用mocha測試的時候提示說nodejs版本過低
問題描述
'scripts': { 'test': 'mocha' }, 'author': '', 'license': 'ISC', 'description': '', 'dependencies': { 'koa': '^2.2.0' }, 'devDependencies': { 'mocha':'^3.2.0', 'supertest': '3.0.0' }
Darwin 16.5.0npm ERR! argv '/usr/local/bin/node' '/usr/local/bin/npm' 'run' 'test'npm ERR! node v7.8.0npm ERR! npm v4.2.0npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! [email protected] test: `mocha`npm ERR! Exit status 1npm ERR! npm ERR! Failed at the [email protected] 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! mochanpm ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs koa-testnpm ERR! Or if that isn’t available, you can get their info via:npm ERR! npm owner ls koa-testnpm 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排除自身錯誤的一個假設。你吧所有錯誤全部貼上來
相關文章:
1. python - 獲取到的數據生成新的mysql表2. javascript - js 對中文進行MD5加密和python結果不一樣。3. mysql里的大表用mycat做水平拆分,是不是要先手動分好,再配置mycat4. window下mysql中文亂碼怎么解決??5. sass - gem install compass 使用淘寶 Ruby 安裝失敗,出現 4046. python - (初學者)代碼運行不起來,求指導,謝謝!7. 為啥不用HBuilder?8. python - flask sqlalchemy signals 無法觸發9. python的文件讀寫問題?10. 為什么python中實例檢查推薦使用isinstance而不是type?
