"빌드"및 "테스트"와 같은 작업을 수행하기 위해 npm run script을 사용하고 있습니다. 예를 들어"npm ERR!"을 숨기거나 음소거 할 수 있습니까? npm 실행 스크립트를 사용할 때 출력 되나요?
같은 내 package.json
외모 다음
{
"name": "fulfillment-service",
"version": "1.0.0",
"description": "Endpoint for CRUD operations on fulfillment status",
"main": "src/server.js",
"scripts": {
"build": "tsc",
"test": "tape tests/*.js"
},
"dependencies": {},
"devDependencies": {
"typescript": "^1.8.10"
}
}
내가 npm run build
를 실행하고 성공, 출력은 다음과 같다 :
> [email protected] build d:\code\fulfillment-service
> tsc
내가 npm run build
을 실행하고 실패 출력은 다음과 같습니다.
> [email protected] build d:\code\fulfillment-service
> tsc
src/server.ts(51,81): error TS2339: Property 'connection' does not exist on type 'IncomingMessage'.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script 'tsc'.
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 fulfillment-service package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fulfillment-service
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fulfillment-service
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! d:\code\fulfillment-service\npm-debug.log
이것은 쓸모없는 정보로 전체 콘솔을 채우고, 맨 위로 스크롤하여 실패한 이유를 확인해야합니다.
개발 중에 npm ERR!
으로 시작하는 줄을 숨기거나 없앨 수 있습니까?
'npm run build --silent' – gcampbell
실행 스크립트의 출력에 관한 문제가 있습니다. [npm/8821] (https://github.com/npm/npm/issues/8821)을 참조하십시오. – styfle