Skip to content

Commit 39e9673

Browse files
committed
fix($core): vuepress dev broken on nodejs v10 and greater (close: #1063) (close: #1064)
Refs: - nodejs/node#21203 - nodejs/node@cbc3ef6
1 parent dcca9fd commit 39e9673

File tree

1 file changed

+2
-1
lines changed
  • packages/@vuepress/core/lib

1 file changed

+2
-1
lines changed

packages/@vuepress/core/lib/dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
8080
const { host, displayHost } = await resolveHost(cliOptions.host || ctx.siteConfig.host)
8181

8282
// debug in a running dev process.
83-
process.stdout.on('data', chunk => {
83+
process.stdin &&
84+
process.stdin.on('data', chunk => {
8485
const parsed = chunk.toString('utf-8').trim()
8586
if (parsed === '*') {
8687
console.log(Object.keys(ctx))

0 commit comments

Comments
 (0)