k12th
@k12th
console.log(`You're pulling my leg, right?`);

Как избежать создания npm-debug.log при падении тестов?

В package.json что-нибудь такое:
"scripts": {
    "test": "mocha --compilers js:./node_modules/babel/register -u bdd -R spec --recursive test"
  },

Если при запуске npm test тесты падают (ожидаемо или нет), npm жалуется в консоль, как ей плохо:
npm ERR! ima-package@0.0.1 test: `mocha --compilers js:./node_modules/babel/register -u bdd -R spec --recursive test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ima-package@0.0.1 test script.
npm ERR! This is most likely a problem with the ima-package package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     mocha --compilers js:./node_modules/babel/register -u bdd -R spec --recursive test
npm ERR! You can get their info via:
npm ERR!     npm owner ls ima-package
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-31-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "test"
npm ERR! cwd /mnt/backup/projects/alchemy
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/user/projects/ima/npm-debug.log
npm ERR! not ok code 0

Такая же беда не только с тестами, но и c jscs и eslint. В результате, чтобы увидеть, что же именно сломалось, надо скроллить вверх, да и npm-debug.log приходится удалять потом.
Как от этого избавиться?
  • Вопрос задан
  • 3062 просмотра
Решения вопроса 1
k12th
@k12th Автор вопроса
console.log(`You're pulling my leg, right?`);
Перечитал документацию еще раз, нашел флаг --force. Все еще остается надпись
This failure might be due to the use of legacy binary "node"
, но это всего три строчки, а не пол-экрана.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы