java và c# có hiệu suất tốt và cân bằng nhất do nó là ngôn ngữ biên dịch thay vì thông dịch như python, thứ 2 là code trong java và c# luôn được kiểm soát chặt chẽ tuy code sẽ dài dòng và vất hơn nhưng bù lại khi chạy sẽ cho hiệu suất tốt hơn cũng như ít bug hơn python, thứ 3 là các biến trong java và c# là kiểu static (java và c# version mới cũng hỗ trợ biến kiểu dynamic nhưng dev vẫn ít khi dùng) còn python là dynamic nên khi chạy code java không cần mất thời gian ép kiểu về định dạng đúng.
@maitrungduc1410 làm sao để e biết được tài khoản đó có những permissions nào để ẩn hiện ạ. hay là lúc đăng nhập e sẽ trả về 1 json như thế này rồi check ạ:
@kevinram npm install mấy cái WARN màu vàng kia bạn cứ kệ nó nhé, ko lỗi là đc. nhưng bạn nên exec vào container rồi hẵng npm install , sau đó là npm run prod
@maitrungduc1410 Mình chạy npm install ở môi trường gốc, thì bị như này :
npm WARN optional Skipping failed optional dependency /laravel-mix/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.3.2
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.3.2
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.3.2
npm WARN @webpack-cli/configtest@1.2.0 requires a peer of webpack@4.x.x || 5.x.x but none was installed.
npm WARN acorn-jsx@5.3.1 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none was installed.
npm WARN ajv-formats@2.1.1 requires a peer of ajv@^8.0.0 but none was installed.
npm WARN babel-loader@8.3.0 requires a peer of webpack@>=2 but none was installed.
npm WARN css-loader@5.2.7 requires a peer of webpack@^4.27.0 || ^5.0.0 but none was installed.
npm WARN file-loader@6.2.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN html-loader@1.3.2 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN laravel-mix@6.0.49 requires a peer of webpack@^5.60.0 but none was installed.
npm WARN mini-css-extract-plugin@1.6.2 requires a peer of webpack@^4.4.0 || ^5.0.0 but none was installed.
npm WARN postcss-load-config@3.1.4 requires a peer of ts-node@>=9.0.0 but none was installed.
npm WARN sass-loader@7.3.1 requires a peer of webpack@^3.0.0 || ^4.0.0 but none was installed.
npm WARN style-loader@2.0.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN webpack-cli@4.10.0 requires a peer of webpack@4.x.x || 5.x.x but none was installed.
npm WARN webpack-dev-middleware@5.3.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN webpack-dev-server@4.15.1 requires a peer of webpack@^4.37.0 || ^5.0.0 but none was installed.
npm WARN ws@8.13.0 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@8.13.0 requires a peer of utf-8-validate@>=5.0.2 but none was installed.
npm WARN webpack-notifier@1.15.0 requires a peer of @types/webpack@>4.41.31 but none was installed.
npm WARN webpackbar@5.0.2 requires a peer of webpack@3 || 4 || 5 but none was installed.
npm WARN ws@7.4.6 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.4.6 requires a peer of utf-8-validate@^5.0.2 but none was installed.
Cảm ơn bài viết rất chi tiết và bổ ích của anh. Em hiện tại cũng đang học điện tử viễn thông ở UET, năm em thi đại học thì ngành AI ở trường chưa mở nhưng năm ngoái thì trường đã có ngành AI, và em cũng đã đăng ký học văn bằng 2 AI và sắp tới khi vào năm học mới thì em sẽ bắt đầu học luôn. Em muốn hỏi anh về việc xin vào lab nghiên cứu, hồi trước anh xin vào lab có cần điều kiện gì không ạ, với cách để xin vào lab như thế nào vì em cũng chưa từng thử xin vào lab của thầy cô nào. Mong anh giải đáp, em cảm ơn ạ
THẢO LUẬN
Tiếp tục phát huy
java và c# có hiệu suất tốt và cân bằng nhất do nó là ngôn ngữ biên dịch thay vì thông dịch như python, thứ 2 là code trong java và c# luôn được kiểm soát chặt chẽ tuy code sẽ dài dòng và vất hơn nhưng bù lại khi chạy sẽ cho hiệu suất tốt hơn cũng như ít bug hơn python, thứ 3 là các biến trong java và c# là kiểu static (java và c# version mới cũng hỗ trợ biến kiểu dynamic nhưng dev vẫn ít khi dùng) còn python là dynamic nên khi chạy code java không cần mất thời gian ép kiểu về định dạng đúng.
Cảm ơn nhận xét của bạn 🙂
👍️👍️👍️
@maitrungduc1410 Mình gửi kết quả nhé
Vẫn lỗi Đức ạ.
@kevinram bạn thử
execlần nữa vào container, chạy lần lượt các command sau nhé(Câu lệnh cache clean force là 2 dấu trừ nhé b)
Mình nghĩ là bằng cách nào đó node modules và package lock của bạn có vấn đề, nên mình đang hướng dẫn bạn clean nó đi và install lại
@quangduc123 uk đúng rồi đó e.
Thông tin về user đó mình lưu ở app.js , truy cập qua $root ấy e
e dùng mà nó cứ quay taij số 0 cả tiếng
@maitrungduc1410
Log lỗi :
Log : /var/www/html # more /root/.npm/_logs/2023-06-17T18_03_59_713Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'prod' ] 2 info using npm@6.14.16 3 info using node@v12.22.12 4 verbose run-script [ 'preprod', 'prod', 'postprod' ] 5 info lifecycle @~preprod: @ 6 info lifecycle @~prod: @ 7 verbose lifecycle @~prod: unsafe-perm in lifecycle true 8 verbose lifecycle @~prod: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/html/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle @~prod: CWD: /var/www/html 10 silly lifecycle @~prod: Args: [ '-c', 'npm run production' ] 11 silly lifecycle @~prod: Returned: code: 1 signal: null 12 info lifecycle @~prod: Failed to exec prod script 13 verbose stack Error: @ prod: npm run production 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:314:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:314:20) 13 verbose stack at maybeClose (internal/child_process.js:1022:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 14 verbose pkgid @ 15 verbose cwd /var/www/html 16 verbose Linux 4.15.0-212-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "prod" 18 verbose node v12.22.12 19 verbose npm v6.14.16 20 error code ELIFECYCLE 21 error errno 1 22 error @ prod: npm run production 22 error Exit status 1 23 error Failed at the @ prod script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
@maitrungduc1410 Mình có chạy trong container, kết quả lỗi như comment trước đó. Nhờ Đức check giúp
@maitrungduc1410 làm sao để e biết được tài khoản đó có những permissions nào để ẩn hiện ạ. hay là lúc đăng nhập e sẽ trả về 1 json như thế này rồi check ạ:
Cảm ơn ad, bài rất bổ ích
@kevinram npm install mấy cái WARN màu vàng kia bạn cứ kệ nó nhé, ko lỗi là đc. nhưng bạn nên
execvào container rồi hẵngnpm install, sau đó lànpm run prod@maitrungduc1410 Mình chạy npm install ở môi trường gốc, thì bị như này :
npm WARN optional Skipping failed optional dependency /laravel-mix/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.3.2
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.3.2
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.3.2
npm WARN @webpack-cli/configtest@1.2.0 requires a peer of webpack@4.x.x || 5.x.x but none was installed.
npm WARN acorn-jsx@5.3.1 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none was installed.
npm WARN ajv-formats@2.1.1 requires a peer of ajv@^8.0.0 but none was installed.
npm WARN babel-loader@8.3.0 requires a peer of webpack@>=2 but none was installed.
npm WARN css-loader@5.2.7 requires a peer of webpack@^4.27.0 || ^5.0.0 but none was installed.
npm WARN file-loader@6.2.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN html-loader@1.3.2 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN laravel-mix@6.0.49 requires a peer of webpack@^5.60.0 but none was installed.
npm WARN mini-css-extract-plugin@1.6.2 requires a peer of webpack@^4.4.0 || ^5.0.0 but none was installed.
npm WARN postcss-load-config@3.1.4 requires a peer of ts-node@>=9.0.0 but none was installed.
npm WARN sass-loader@7.3.1 requires a peer of webpack@^3.0.0 || ^4.0.0 but none was installed.
npm WARN style-loader@2.0.0 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN webpack-cli@4.10.0 requires a peer of webpack@4.x.x || 5.x.x but none was installed.
npm WARN webpack-dev-middleware@5.3.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none was installed.
npm WARN webpack-dev-server@4.15.1 requires a peer of webpack@^4.37.0 || ^5.0.0 but none was installed.
npm WARN ws@8.13.0 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@8.13.0 requires a peer of utf-8-validate@>=5.0.2 but none was installed.
npm WARN webpack-notifier@1.15.0 requires a peer of @types/webpack@>4.41.31 but none was installed.
npm WARN webpackbar@5.0.2 requires a peer of webpack@3 || 4 || 5 but none was installed.
npm WARN ws@7.4.6 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.4.6 requires a peer of utf-8-validate@^5.0.2 but none was installed.
Khoai thật sự
Cảm ơn bài viết rất chi tiết và bổ ích của anh. Em hiện tại cũng đang học điện tử viễn thông ở UET, năm em thi đại học thì ngành AI ở trường chưa mở nhưng năm ngoái thì trường đã có ngành AI, và em cũng đã đăng ký học văn bằng 2 AI và sắp tới khi vào năm học mới thì em sẽ bắt đầu học luôn. Em muốn hỏi anh về việc xin vào lab nghiên cứu, hồi trước anh xin vào lab có cần điều kiện gì không ạ, với cách để xin vào lab như thế nào vì em cũng chưa từng thử xin vào lab của thầy cô nào. Mong anh giải đáp, em cảm ơn ạ
@maitrungduc1410 Mình đã chạy và gặp những lỗi sau :

Log : /var/www/html # more /root/.npm/_logs/2023-06-17T18_03_59_713Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'prod' ] 2 info using npm@6.14.16 3 info using node@v12.22.12 4 verbose run-script [ 'preprod', 'prod', 'postprod' ] 5 info lifecycle @~preprod: @ 6 info lifecycle @~prod: @ 7 verbose lifecycle @~prod: unsafe-perm in lifecycle true 8 verbose lifecycle @~prod: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/html/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle @~prod: CWD: /var/www/html 10 silly lifecycle @~prod: Args: [ '-c', 'npm run production' ] 11 silly lifecycle @~prod: Returned: code: 1 signal: null 12 info lifecycle @~prod: Failed to exec prod script 13 verbose stack Error: @ prod:
npm run production13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:314:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:314:20) 13 verbose stack at maybeClose (internal/child_process.js:1022:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 14 verbose pkgid @ 15 verbose cwd /var/www/html 16 verbose Linux 4.15.0-212-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "prod" 18 verbose node v12.22.12 19 verbose npm v6.14.16 20 error code ELIFECYCLE 21 error errno 1 22 error @ prod:npm run production22 error Exit status 1 23 error Failed at the @ prod script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]bài viết hay quá
thx tác giả
@kevinram bạn exec thẳng vào container rồi chạy “npm install” và “npm run prod”
Rồi kiểm tra lại file đó ở folder public nhé
@maitrungduc1410 mình đã install các dependencies còn thiếu rồi thì mới đến bước này. Trong trường hợp thiếu file thì fix thế nào nhỉ?
Mình nghĩ nên dùng từ 'dành' thay cho từ 'giành'