Node.js v12 to v14

This page provides a list of codemods to help you migrate your code from Node.js v12 to v14.

util-print-to-console-log

This recipe transforms the usage of log functions from util, print, puts, debug, error to use console.log() or console.error().

So this codemod handle DEP0026, DEP0027, DEP0028 and DEP0029.

npx codemod run @nodejs/create-require-from-path

Example:

const util = require('node:util');

util.print('Hello world');
util.puts('Hello world');
util.debug('Hello world');
util.error('Hello world');
읽는 데 걸리는 시간
0분
저자
기여하기
이 페이지 수정
목차
  1. util-print-to-console-log
  2. Example: