1
在Node.js中,Buffer類是全局的。當我試圖在Visual Studio代碼中執行下面的代碼行時,node.js拋出異常。在node.js中,Buffer.from()方法拋出「ascii不是函數」錯誤
我的代碼
var buffer = Buffer.from('Hello','ascii');
異常
TypeError: ascii is not a function
at Function.from (native)
at Function.from (native)
您使用的是什麼版本的節點? – mscdex
我正在使用4.4.3 – Shailendra