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! koa-test@1.0.0 test: `mocha`npm ERR! Exit status 1npm 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! 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. windows - asp.net連接上mysql之后如何調用?比如下面的登錄驗證功能怎么實現2. 剛放到服務器的項目出現這中錯誤,有高手指點嗎3. css3 - Typecho 后臺部分表單按鈕在 Chrome 下出現靈異動畫問題,求解決4. apache - 想把之前寫的單機版 windows 軟件改成網絡版,讓每個用戶可以注冊并登錄。類似 qq 的登陸,怎么架設服務器呢?5. mysql - 面試題:如何把login_log表轉換成last_login表?6. javascript - nodejs實現異步時遇到的一個問題7. javascript - 為什么嵌套的Promise不能按預期捕獲Exception?8. javascript - 編程,算法的問題9. css - 手機qq打開網頁無法使用文件上傳功能?10. java - HTTPS雙向認證基礎上有無必要再進行加簽驗簽?
