zoukankan      html  css  js  c++  java
  • Solve Error: Console expects a writable stream instance

    When running hexo server, you might get the following error:

    console.js:35
        throw new TypeError('Console expects a writable stream instance');
        ^
    
    TypeError: Console expects a writable stream instance
        at new Console (console.js:35:11)
        at Object.<anonymous> (/Users/YourAlias/.nvm/versions/node/v8.9.0/lib/node_modules/hexo/node_modules/hexo-log/lib/log.js:31:17)
        at Module._compile (module.js:635:30)
        at Object.Module._extensions..js (module.js:646:10)
        at Module.load (module.js:554:32)
        at tryModuleLoad (module.js:497:12)
        at Function.Module._load (module.js:489:3)
        at Module.require (module.js:579:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (/Users/YourAlias/.nvm/versions/node/v8.9.0/lib/node_modules/hexo/node_modules/hexo-cli/lib/context.js:3:16)
        at Module._compile (module.js:635:30)
        at Object.Module._extensions..js (module.js:646:10)
        at Module.load (module.js:554:32)
        at tryModuleLoad (module.js:497:12)
        at Function.Module._load (module.js:489:3)
        at Module.require (module.js:579:17)
    

    This is because your node version is too old, hexo 5 depends on node version >= 10.13.0.

    Solution:

    Run nvm ls-remote, and find the version you want to update to.

    Run nvm install 15.6.0, will update to v15.6.0.

  • 相关阅读:
    2016年第9本:系统之美
    2016年第8本:不可思议的心理控制实验
    2016年第7本:非暴力沟通
    用SDWebImage渐变加载图片
    iOS相册、相机、通讯录权限获取
    屏蔽iOS10模拟器海量的垃圾debug信息
    Swift
    Swift
    PlaceholderImageView
    Swift
  • 原文地址:https://www.cnblogs.com/grandyang/p/14613813.html
Copyright © 2011-2022 走看看