zoukankan      html  css  js  c++  java
  • TypeError: Buffer.allocUnsafe is not a function

    1、错误描述

    > Buffer.allocUnsafe(10);
    TypeError: Buffer.allocUnsafe is not a function
        at repl:1:8
        at REPLServer.defaultEval (repl.js:262:27)
        at bound (domain.js:287:14)
        at REPLServer.runBound [as eval] (domain.js:300:12)
        at REPLServer.<anonymous> (repl.js:431:12)
        at emitOne (events.js:82:20)
        at REPLServer.emit (events.js:169:7)
        at REPLServer.Interface._onLine (readline.js:211:10)
        at REPLServer.Interface._line (readline.js:550:8)
        at REPLServer.Interface._ttyWrite (readline.js:827:14)
    > Buffer.allocUnsafe(5);
    TypeError: Buffer.allocUnsafe is not a function
        at repl:1:8
        at REPLServer.defaultEval (repl.js:262:27)
        at bound (domain.js:287:14)
        at REPLServer.runBound [as eval] (domain.js:300:12)
        at REPLServer.<anonymous> (repl.js:431:12)
        at emitOne (events.js:82:20)
        at REPLServer.emit (events.js:169:7)
        at REPLServer.Interface._onLine (readline.js:211:10)
        at REPLServer.Interface._line (readline.js:550:8)
        at REPLServer.Interface._ttyWrite (readline.js:827:14)

    2、错误原因

    由官网上的实例,尝试着做了下,发现报这个错误


    3、解决办法

  • 相关阅读:
    yii2框架随笔27
    yii2框架随笔26
    yii2框架随笔25
    yii2框架随笔24
    yii2框架随笔23
    yii2框架随笔21
    yii2框架随笔20
    yii2框架随笔19
    yii2源码学习笔记(十五)
    yii2源码学习笔记(十四)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13314140.html
Copyright © 2011-2022 走看看