Skip to content

[Q][Support] Khi chạy "node app.js" bị báo lỗi "Error: Cannot find module 'express'" #13

@vuhung

Description

@vuhung

Em new với nodejs nhé.

Em cài thử

495 git clone https://github.com/Openroadvietnam/openaccounting.git
497 cd openaccounting/
499 node app.js

-> bị báo thiếu/lỗi

module.js:340
throw err;
^
Error: Cannot find module 'express'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/vuhung/tmp/openaccounting/app.js:16:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

502 npm install express
504 npm install body-parser
506 npm install passport
508 npm install phantom
510 npm install mongoose
-> Cài xong 1 loạt và chạy thử lại "node app.js" vẫn bị báo thiếu gói.

Có lẽ nodejs chưa cài đặt, cấu hình đúng hay sao?
Mong các bác giúp đỡ

vuhung@d330:/tmp/openaccounting$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.1 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
vuhung@d330:
/tmp/openaccounting$ uname -a
Linux d330 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions