Lập trình NODEJS – Bài 2: CÀI ĐẶT NODEJS

20
Rate this post



Lập trình NODEJS – Lập trình NODEJS – Bài 2: CÀI ĐẶT NODEJS

NodeJS & Socket IO là một công nghệ tuyệt vời nhất để thiết kế những ứng dụng/game/web thời gian thực (Real-Time)
Khóa học lập trình NodeJS tại Khoa Phạm:

NodeJS & Khóa học lập trình iOS tại Khoa Phạm:
NodeJS & Khóa học lập trình Android tại Khoa Phạm:

Tag: lap trinh NodeJS, khoa hoc nodeJS, khóa học NodeJS, lập trình NodeJS, lap trinh nodejs & socket IO, nodejs & express, thiet ke web voi NodeJS, lap trinh nodeJS Express

Xem thêm bài viết Mẹo Vặt khác: http://máp.vn/category/meo-vat

Nguồn: http://máp.vn

20 Comments

  1. $ node app.js
    module.js:487
    throw err;
    ^

    Error: Cannot find module 'C:UsersVANKHANHPRDesktopZALOapp.js'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

    e mới chạy gặp ngay lỗi này , thầy giúp e fix với a

    Reply
  2. Chào thầy, Dũng đã sử lý dc lỗi " ko tạo dc file .js " . tuy nhiên khi sư dụng bản v6.3.1 thì có 1 số hàm khác như thầy hướng dẫn .
    vd :
    var buffer = new Buffer("Hello");
    console.log(buffer); thì chạy nhưng nếu truyền ("Hello " + " utf-8"); thì báo lối do ko chấp nhận truyền utf-8.

    và bài 11 sư dung fs truyen file thì báo lỗi:
    var noidung = fs.readFileSync( _dirName + "/danhsach.txt");
    ^

    ReferenceError: _dirName is not defined

    vậy trên v6.3.1 thay đổi như thế nào ?? tks

    Reply
  3. Chào thầy, Thầy cho DŨng hỏi giống như Thanh Xuân Nguyen . DŨng đã cài dặt nodejs v6.3.1 , chạy thử cmd đã báo thành công nhưng tại sao khi Dũng tạo file trên folder giống như thầy hướng dẫn thì ko chuyển dc đuôi .js . trên dw vẫn hiện app.js.txt và chạy thử git bash here thì báo lỗi ko tìm thấy module App . rất mong thầy hướng dẫn thêm. cám ơn thầy rất nhiêu.

    Reply
  4. Bạn nào bị lỗi "bash: node command not found" thì làm theo hướng dẫn này nha
    Right-click Computer, and then click Properties.
    Click the Advanced system settings in the left side bar.
    Click the Advanced tab.
    Click Environment variables.
    Append the node path to the PATH variable
    Create a new variable NODE_PATH and set it to the path where node is installed

    Source: http://soup.vivekjishtu.com/post/159898736/Running-node-exe-windows

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *