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.

  • 相关阅读:
    JavaScript数组升降序排列、最大值、最小值等
    css3箭头
    隐藏显示
    最后一个 last-of-type
    jquery函数封装
    为什么要使用rem
    Git的使用--如何将本地项目上传到Github
    jQuery判断是否选中
    数组索引赋值
    HTML中input和button设置同样高度却不能等高的原因
  • 原文地址:https://www.cnblogs.com/grandyang/p/14613813.html
Copyright © 2011-2022 走看看