cli: suppress Node.js SQLite ExperimentalWarning #179
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
CLI 每次运行都会打印 Node.js 的 SQLite experimental warning:
这是
node:sqlite模块的标准警告,但对用户来说是视觉噪音,没有实际价值。方案
在 CLI 入口(或 daemon/worker 启动时)通过
process.removeAllListeners(warning)或--no-warningsflag 过滤掉ExperimentalWarning类型的警告。推荐做法:在入口处加一个 warning filter,只屏蔽
ExperimentalWarning,保留其他警告:或者在 spawn worker 时加
NODE_OPTIONS=--no-warnings。