Tôi bắt đầu phát triển với node.j, tôi gặp một vấn đề liên quan đến việc sử dụng mô-đun 'ghê gớm'.Không thể tìm thấy mô-đun ghê gớm - Node.js
Tôi có lỗi này:
Error: Cannot find module 'formidable'
Dưới đây là danh sách module cài đặt bằng 'ls NPM cài đặt':
├─┬ [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ └── [email protected] ├── [email protected] ├─┬ [email protected] │ ├── [email protected] │ └─┬ [email protected] │ ├── [email protected] │ ├── [email protected] │ └─┬ [email protected] │ ├── [email protected] │ ├── [email protected] │ └── [email protected] ├─┬ [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ └── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ ├── [email protected] │ │ └── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ ├── [email protected] │ └── [email protected] └─┬ [email protected] ├── [email protected] ├── [email protected] └─┬ [email protected] ├─┬ [email protected] │ └── [email protected] ├── [email protected] ├─┬ [email protected] │ ├── [email protected] │ └── [email protected] └── [email protected]
tôi thêm rằng đó là mô-đun duy nhất tạo ra lỗi này.
Ngoài ra, tôi không thực sự hiểu cách đóng gói một số mô-đun, có vẻ như npm đang cài đặt mô-đun trực tiếp trong thư mục Tôi đang sử dụng lệnh cài đặt mô-đun và tôi nhận thấy rằng sự ghê gớm đã được cài đặt trong Express/connect/module trong lần cài đặt đầu tiên.
Bạn có thể cho tôi biết thêm thông tin về cây cài đặt mô-đun không.
Thank cho bài trả lời của bạn
Cheers
Đừng hoảng sợ! Hãy bình tĩnh, suy nghĩ xem bạn đã nhìn thấy ở đâu cuối cùng có thể hiểu được Node.js _... :) – gdoron
Chúng ta có thể vui lòng xem mã nơi bạn cố gắng yêu cầu ghê gớm không? Nếu không, chúng tôi có thể làm bất cứ điều gì để giúp bạn ... – Hubro
Tôi đang gọi yêu cầu của các mô-đun ngay từ đầu tệp tin.js của tôi, tôi đang sử dụng lệnh gọi này: var formidable = require ("formidable") ; – bengo