cuốn sách gpt4 ai đã làm

Lỗi trình tạo dự án Node.Js Express-Generator (encoding&& Encoding.toLowerCase()

In lại Tác giả: Vũ trụ không gian Thời gian cập nhật: 2023-11-04 02:29:32 30 4
mua khóa gpt4 Nike

Đã cài đặt phiên bản mới nhất củaNút.Js()và gói npm **(1.2.10)** khi tôi chạy lệnh Express để tạo dự án, nó báo lỗi sau

bộ đệm.js:240
switch (mã hóa && mã hóa.toLowerCase()) {
^
TypeError: Đối tượng # không có phương thức 'toLowerCase'
tại Function.Buffer.isEncoding (buffer.js:240:32)
tại khẳng địnhEncoding (fs.js:98:27)
tại Object.fs.writeFileSync (fs.js:908:3)
lúc ghi (/usr/local/lib/node_modules/express-generator/bin/express:273:6)
tại /usr/local/lib/node_modules/express-generator/bin/express:233:5
tại /usr/local/lib/node_modules/express-generator/bin/express:288:11
tại /usr/local/lib/node_modules/express-generator/node_modules/mkdirp/index.js:47:26
tại Object.oncomplete (fs.js:93:15)
tại process._makeCallback (node.js:321:24)

câu trả lời hay nhất

Sử dụng lệnh này để nâng cấp qua Build và nó hoạt động

Làm sạch bộ đệm sudo npm -f 
cài đặt sudo npm -gn
sudo n ổn định
Cài đặt lại Express và Express-Generator
cài đặt sudo npm -g express
cài đặt sudo npm -g express-generator

Về lỗi trình tạo dự án Node.Js Express-Generator (encoding && Encoding.toLowerCase()), chúng tôi đã tìm thấy một câu hỏi tương tự trên Stack Overflow: https://stackoverflow.com/questions/28092417/

30 4 0
không gian vũ trụ
Hồ sơ

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá taxi Didi miễn phí
Phiếu giảm giá taxi Didi
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress