Node errors encountered in learning and using 1

learn Node.js and use it immediately. Encounter the first unsolvable error

//npm install utils
var utils = require("utils"),
EventEmitter = require("events").EventEmitter;

var Server = function(){
  console.log("init");
}

utils.inherits(Server, EventEmitter);

var s = new Server();
s.on("abc", function(){
  console.log("abc");
});

s.emit("abc");

error message

TypeError: utils.inherits is not a function

excuse me, where is the problem here?

Mar.04,2022

nodejs comes with util , and there is no s


with import utils from 'utils'


there are two similar
if you are talking about this http://shouce.jb51.net/nodejs., then you have a problem.
if this is the case, https://www.npmjs.com/package., there is really no inherits method.


var utils = require ('utils')

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b788-4cd3b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b788-4cd3b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?