自从升级到npm 5以来,尽管设置了npm fetch GET 200 ...
,但我在构建服务器上收到了大量npm config set loglevel warn
条消息(见下文)。那有新的设置吗?
[0m[91mnpm info[0m[91m config[0m[91m set "loglevel" "warn"
[0m[91mnpm info [0m[91mok
[0m[91mnpm[0m[91m info it worked if it ends with ok
[0m[91mnpm info using npm@5.3.0
npm info using node@v8.3.0
[0m[91mnpm info lifecycle myapp-client@0.0.1~preinstall: myapp-client@0.0.1
[0m[91mnpm http fetch GET 200 https://registry.npmjs.org/babel-eslint 98ms
[0m[91mnpm http fetch GET 200 https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz 23ms
[...]
答案 0 :(得分:2)
带节点的Docker容器通常将ENV
变量NPM_CONFIG_LOGLEVEL
设置为info
而不是默认warn
。您可以自己设置此ENV
var或使用npm install --logLevel warn
覆盖该行为。