मैं "निर्माण" और "परीक्षण" जैसे कार्यों को करने के लिए npm run script का उपयोग कर रहा हूं।क्या मैं छुपा या चुप्पी कर सकता हूं "एनपीएम ईआरआर!" एनपीएम रन स्क्रिप्ट का उपयोग करते समय आउटपुट?
उदाहरण के लिए, मेरे 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 रन बिल्ड --सिलेंट – gcampbell
रन स्क्रिप्ट के आउटपुट के बारे में एक मुद्दा खुला है। [एनपीएम/8821] देखें (https://github.com/npm/npm/issues/8821) – styfle