# Node

**URL:** https://forum.codewithmosh.com/c/node/9.md

[Latest](https://forum.codewithmosh.com/latest.md) · [Categories](https://forum.codewithmosh.com/categories.md)

---

## [About the Node category](https://forum.codewithmosh.com/t/about-the-node-category/19)

<div class="topic-metadata">

**Author:** [@Mosh](https://forum.codewithmosh.com/u/Mosh)\
**Replies:** 0\
**Last updated:** [October 22, 2020, 10:26pm UTC](https://forum.codewithmosh.com/t/about-the-node-category/19 "2020-10-22T22:26:57Z")

</div>

---

## [Counting Tokens](https://forum.codewithmosh.com/t/counting-tokens/71731)

<div class="topic-metadata">

**Author:** [@Ruben\_L](https://forum.codewithmosh.com/u/Ruben_L)\
**Replies:** 2\
**Last updated:** [November 1, 2025, 10:41am UTC](https://forum.codewithmosh.com/t/counting-tokens/71731 "2025-11-01T10:41:28Z")

</div>

Hi, I want to count tokens using VS Code, but the output only returns ‘tokens’ Below is the results, the index.js and the package.json Why it does not return Uin32Array and number of tokens ?

---

## [Help with login a page using puppeteer](https://forum.codewithmosh.com/t/help-with-login-a-page-using-puppeteer/24372)

<div class="topic-metadata">

**Author:** [@Malathsam1994](https://forum.codewithmosh.com/u/Malathsam1994)\
**Replies:** 1\
**Last updated:** [September 8, 2025, 8:29am UTC](https://forum.codewithmosh.com/t/help-with-login-a-page-using-puppeteer/24372 "2025-09-08T08:29:19Z")

</div>

Hi all, I posted a thread about three months ago, inquiring about an idea I had to create a web scraping script for tracking specific information. The purpose is to notify me if someone puts their ticket up for sale, al…

---

## [Node course - unit testing](https://forum.codewithmosh.com/t/node-course-unit-testing/71165)

<div class="topic-metadata">

**Author:** [@yoir](https://forum.codewithmosh.com/u/yoir)\
**Replies:** 2\
**Last updated:** [April 5, 2025, 8:40pm UTC](https://forum.codewithmosh.com/t/node-course-unit-testing/71165 "2025-04-05T20:40:36Z")

</div>

in the exercise mosh tested a function using the jsonwebtoken library. this is a mistake. this is clearly integration testing and not a unit test. This unit has dependencies on jwt and on mongoose to generate a valid \_i…

---

## [VSCode intellisense not working properly for node.js](https://forum.codewithmosh.com/t/vscode-intellisense-not-working-properly-for-node-js/71118)

<div class="topic-metadata">

**Author:** [@atezian](https://forum.codewithmosh.com/u/atezian)\
**Replies:** 2\
**Last updated:** [March 30, 2025, 3:12am UTC](https://forum.codewithmosh.com/t/vscode-intellisense-not-working-properly-for-node-js/71118 "2025-03-30T03:12:55Z")

</div>

I’m following the Node.js course and the VSCode intellisense is autocompleting “module.” into “MediaSourceHandle” “require(” into “requestAnimationFrame()” Etc. This is incredibly frustrating. I can’t find any soluti…

---

## [Nodejs environment variables](https://forum.codewithmosh.com/t/nodejs-environment-variables/17967)

<div class="topic-metadata">

**Author:** [@abdunozir](https://forum.codewithmosh.com/u/abdunozir)\
**Replies:** 22\
**Last updated:** [March 5, 2025, 5:07am UTC](https://forum.codewithmosh.com/t/nodejs-environment-variables/17967 "2025-03-05T05:07:01Z")

</div>

i am using windows 10 and poweshell. i created config dir and custom-environment-variables.json file and wrote all Mosh did. But there is an error that password is not defined. this is an error that i see ? what ca…

---

## [Is the nodeJS course outdated like the angular course?](https://forum.codewithmosh.com/t/is-the-nodejs-course-outdated-like-the-angular-course/71086)

<div class="topic-metadata">

**Author:** [@LastHang](https://forum.codewithmosh.com/u/LastHang)\
**Replies:** 3\
**Last updated:** [February 28, 2025, 8:08am UTC](https://forum.codewithmosh.com/t/is-the-nodejs-course-outdated-like-the-angular-course/71086 "2025-02-28T08:08:05Z")

</div>

I was just about to delve into angular and found out that the course is far too outdated. Some of the materail is still outdated like react native. I was wondering if anybody who took the node course thinks that it is o…

---

## [Cmd not console logging all information](https://forum.codewithmosh.com/t/cmd-not-console-logging-all-information/71121)

<div class="topic-metadata">

**Author:** [@atezian](https://forum.codewithmosh.com/u/atezian)\
**Replies:** 0\
**Last updated:** [February 25, 2025, 12:44am UTC](https://forum.codewithmosh.com/t/cmd-not-console-logging-all-information/71121 "2025-02-25T00:44:39Z")

</div>

I need help setting up my windows cmd to show the full information. This is Mosh’s cmd log. It contains the function information: This is my console log. ( I can’t upload the image. I can only upload one image). Min…

---

## [Node: Problems & Solutions - Part 2 of 3 (course completed, except deployment - see Part 3)](https://forum.codewithmosh.com/t/node-problems-solutions-part-2-of-3-course-completed-except-deployment-see-part-3/11615)

<div class="topic-metadata">

**Author:** [@kavfam](https://forum.codewithmosh.com/u/kavfam)\
**Replies:** 4\
**Last updated:** [January 20, 2025, 10:56am UTC](https://forum.codewithmosh.com/t/node-problems-solutions-part-2-of-3-course-completed-except-deployment-see-part-3/11615 "2025-01-20T10:56:09Z")

</div>

Please note that I posted Part 1 previously. I am running windows 10 and use vscode. At the end I show my package.json showing the versions of all packages used. Here are the issues I ran into and solutions found in the …

---

## [How i connect frontend to backend full course](https://forum.codewithmosh.com/t/how-i-connect-frontend-to-backend-full-course/30578)

<div class="topic-metadata">

**Author:** [@sadiiq\_mukhtaar](https://forum.codewithmosh.com/u/sadiiq_mukhtaar)\
**Replies:** 1\
**Last updated:** [December 18, 2024, 5:18pm UTC](https://forum.codewithmosh.com/t/how-i-connect-frontend-to-backend-full-course/30578 "2024-12-18T17:18:55Z")

</div>

How i connect my database to my database we need full course the course of node it’s not cover that

---

## [API integration with SAP and Dynaimcs 365 ERP](https://forum.codewithmosh.com/t/api-integration-with-sap-and-dynaimcs-365-erp/16741)

<div class="topic-metadata">

**Author:** [@huma](https://forum.codewithmosh.com/u/huma)\
**Replies:** 1\
**Last updated:** [October 30, 2024, 3:42pm UTC](https://forum.codewithmosh.com/t/api-integration-with-sap-and-dynaimcs-365-erp/16741 "2024-10-30T15:42:40Z")

</div>

Hello, I have a issue of DNS while connecting sap or dynamics 365 through ODBC. so i need to change the method of integration these module with NODE. I thought of using API Documentation of these module’s but they is no…

---

## [Beginner Question in Node video](https://forum.codewithmosh.com/t/beginner-question-in-node-video/28797)

<div class="topic-metadata">

**Author:** [@kylesalone](https://forum.codewithmosh.com/u/kylesalone)\
**Replies:** 1\
**Last updated:** [September 18, 2024, 4:58am UTC](https://forum.codewithmosh.com/t/beginner-question-in-node-video/28797 "2024-09-18T04:58:27Z")

</div>

I am watching this video: and at 13:25 when I type “Code .” I get: Command not found PLEASE SOMEONE HELP

---

## [Is the Node Course Outdated?](https://forum.codewithmosh.com/t/is-the-node-course-outdated/26000)

<div class="topic-metadata">

**Author:** [@AshwanthSai](https://forum.codewithmosh.com/u/AshwanthSai)\
**Replies:** 4\
**Last updated:** [August 22, 2024, 4:03pm UTC](https://forum.codewithmosh.com/t/is-the-node-course-outdated/26000 "2024-08-22T16:03:35Z")

</div>

Hi, Hi, The node version in course is V8 while the latest is v21. Will I be able to Complete it without trouble ? Kind Regards, A. Sai

---

## [Node.js validateReturn function: Joi.objectId not a function](https://forum.codewithmosh.com/t/node-js-validatereturn-function-joi-objectid-not-a-function/4562)

<div class="topic-metadata">

**Author:** [@Mathew](https://forum.codewithmosh.com/u/Mathew)\
**Replies:** 6\
**Last updated:** [August 22, 2024, 12:06pm UTC](https://forum.codewithmosh.com/t/node-js-validatereturn-function-joi-objectid-not-a-function/4562 "2024-08-22T12:06:22Z")

</div>

My current validateReturn function: function validateReturn(req) { const schema = { customerId: Joi.objectId().required(), movieId: Joi.objectId().required(), }; return Joi.validate(req, schema); } All my tests n…

---

## [Error: uncaughtException: FATAL ERROR:jwtPrivateKey is not defined](https://forum.codewithmosh.com/t/error-uncaughtexception-fatal-error-jwtprivatekey-is-not-defined/458)

<div class="topic-metadata">

**Author:** [@Ramyasri](https://forum.codewithmosh.com/u/Ramyasri)\
**Replies:** 9\
**Last updated:** [August 5, 2024, 8:20pm UTC](https://forum.codewithmosh.com/t/error-uncaughtexception-fatal-error-jwtprivatekey-is-not-defined/458 "2024-08-05T20:20:37Z")

</div>

error: uncaughtException: FATAL ERROR:jwtPrivateKey is not defined

---

## [Error: Invalid transport, must be an object with a log method](https://forum.codewithmosh.com/t/error-invalid-transport-must-be-an-object-with-a-log-method/17030)

<div class="topic-metadata">

**Author:** [@AhmedElewa95](https://forum.codewithmosh.com/u/AhmedElewa95)\
**Replies:** 1\
**Last updated:** [July 27, 2024, 2:50am UTC](https://forum.codewithmosh.com/t/error-invalid-transport-must-be-an-object-with-a-log-method/17030 "2024-07-27T02:50:37Z")

</div>

in Nodejs course, handling and logging errors chapter, lectures 6 & 7 Mosh has added a new logfile.log by this approach: “winston.add(winston.transports.File , {filename : ‘logfile.log’});” but this approach is no lon…

---

## [Postman is now deprecated, what to use?](https://forum.codewithmosh.com/t/postman-is-now-deprecated-what-to-use/25112)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 8\
**Last updated:** [July 18, 2024, 6:06am UTC](https://forum.codewithmosh.com/t/postman-is-now-deprecated-what-to-use/25112 "2024-07-18T06:06:55Z")

</div>

The tool mosh uses in the Restful API section postman to create course routes with json data is deprecated from google chrome. Is there another equivalent tool or it says there is postman native would that work?

---

## [Nodemon is not starting 'node index.js'](https://forum.codewithmosh.com/t/nodemon-is-not-starting-node-index-js/26873)

<div class="topic-metadata">

**Author:** [@ZaheerDar](https://forum.codewithmosh.com/u/ZaheerDar)\
**Replies:** 2\
**Last updated:** [May 27, 2024, 11:34am UTC](https://forum.codewithmosh.com/t/nodemon-is-not-starting-node-index-js/26873 "2024-05-27T11:34:55Z")

</div>

I am enrolled in NodeJS course, I installed nodemon and checked its version and then i use it but when start file with nodemon its showed that nodemon is started but when i made changes in the file its stuck in showing r…

---

## [Deployment of node vidly project via render.com free](https://forum.codewithmosh.com/t/deployment-of-node-vidly-project-via-render-com-free/26284)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 3\
**Last updated:** [April 26, 2024, 3:53pm UTC](https://forum.codewithmosh.com/t/deployment-of-node-vidly-project-via-render-com-free/26284 "2024-04-26T15:53:31Z")

</div>

So from what I’ve through my deployment was in the middle of easy and a hassle. taking about 3 hours of messing with the url string. But i can confirm this course is still useful and given a few lines of deprecated code,…

---

## [Heroku deployment not free](https://forum.codewithmosh.com/t/heroku-deployment-not-free/26267)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 1\
**Last updated:** [April 25, 2024, 2:34am UTC](https://forum.codewithmosh.com/t/heroku-deployment-not-free/26267 "2024-04-25T02:34:36Z")

</div>

I was wondering is there somewhere else i can store my vidly app, like vercel? and would it be able to support mongoDB? because mlab is no longer on heroku either would object rocket work, once again it’s not free

---

## [Npm helmet is not loading properly](https://forum.codewithmosh.com/t/npm-helmet-is-not-loading-properly/26266)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 0\
**Last updated:** [April 24, 2024, 9:38pm UTC](https://forum.codewithmosh.com/t/npm-helmet-is-not-loading-properly/26266 "2024-04-24T21:38:16Z")

</div>

I installed helmet and it’s listed in my package.json and also i see it in the node\_Modules folder but it’s grey and i’m getting an error when trying to do npm start. It’s not being called as a function in the production…

---

## [Testing valid returns api](https://forum.codewithmosh.com/t/testing-valid-returns-api/26231)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 2\
**Last updated:** [April 23, 2024, 8:58pm UTC](https://forum.codewithmosh.com/t/testing-valid-returns-api/26231 "2024-04-23T20:58:07Z")

</div>

I’m trying to pass the happy route however I’m encountering some problems keep getting 404 server error, also not seeing a collection for the returns on mongoDB idk if i should but i would think if we are saving it, ther…

---

## [A group for node js , react js](https://forum.codewithmosh.com/t/a-group-for-node-js-react-js/26163)

<div class="topic-metadata">

**Author:** [@AshokKumar](https://forum.codewithmosh.com/u/AshokKumar)\
**Replies:** 0\
**Last updated:** [April 18, 2024, 12:55am UTC](https://forum.codewithmosh.com/t/a-group-for-node-js-react-js/26163 "2024-04-18T00:55:39Z")

</div>

Hi, if you are learning node js, react js, and want a study partner, you can join this group, here we can help each other.

---

## [Logging error on winston update must be an object with a log method](https://forum.codewithmosh.com/t/logging-error-on-winston-update-must-be-an-object-with-a-log-method/26101)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 1\
**Last updated:** [April 14, 2024, 7:08pm UTC](https://forum.codewithmosh.com/t/logging-error-on-winston-update-must-be-an-object-with-a-log-method/26101 "2024-04-14T19:08:04Z")

</div>

I noticed when doing the section I had an error and server crash “Invalid transport, must be an object with a log method” so I check documentation and there is only one reference to log method which says something about…

---

## [Trouble Installing Underscore with NPM](https://forum.codewithmosh.com/t/trouble-installing-underscore-with-npm/482)

<div class="topic-metadata">

**Author:** [@chiahao](https://forum.codewithmosh.com/u/chiahao)\
**Replies:** 14\
**Last updated:** [April 9, 2024, 11:16pm UTC](https://forum.codewithmosh.com/t/trouble-installing-underscore-with-npm/482 "2024-04-09T23:16:57Z")

</div>

Hi, I am trying to install underscore but my npm version 5.5.1 does not support Node LTS v14.15.0 I have tried to uninstall/reinstall NodeJS. I also tried to update npm with npm install -g npm. Nothing seems to work. …

---

## [Docker Volume Link Windows (Nodemon) - The Ultimate Docker Course](https://forum.codewithmosh.com/t/docker-volume-link-windows-nodemon-the-ultimate-docker-course/4794)

<div class="topic-metadata">

**Author:** [@Raul88](https://forum.codewithmosh.com/u/Raul88)\
**Replies:** 5\
**Last updated:** [March 3, 2024, 2:23am UTC](https://forum.codewithmosh.com/t/docker-volume-link-windows-nodemon-the-ultimate-docker-course/4794 "2024-03-03T02:23:48Z")

</div>

Hello to everybody. I’m doing the “The Ultimate Docker Course” and I’m on a Windows Machine. The following 2 lessons have a nodemon problem that will not update the app after a modify is made: 11- Sharing the Source Co…

---

## [Loading circle of death :(](https://forum.codewithmosh.com/t/loading-circle-of-death/25404)

<div class="topic-metadata">

**Author:** [@Jag](https://forum.codewithmosh.com/u/Jag)\
**Replies:** 0\
**Last updated:** [March 1, 2024, 9:17am UTC](https://forum.codewithmosh.com/t/loading-circle-of-death/25404 "2024-03-01T09:17:18Z")

</div>

Hi guys, I recently subscribed to Mosh backend programming in Node/Express/MongoDB. I am hard stuck at a very trivial problem and need help. So my programme is connected to port 8080 and my database is connected as well.…

---

## [Joi.validate is deprecated](https://forum.codewithmosh.com/t/joi-validate-is-deprecated/25135)

<div class="topic-metadata">

**Author:** [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Replies:** 1\
**Last updated:** [February 16, 2024, 1:01am UTC](https://forum.codewithmosh.com/t/joi-validate-is-deprecated/25135 "2024-02-16T01:01:28Z")

</div>

i’m trying this but the console is saying invalid message options app.post(‘/api/courses’, (req, res) =\> { const schema = Joi.object ({ name: Joi.string().min(3) }); const result = schema.validate(req.body, schema)…

---

## [How to download Node.js course material](https://forum.codewithmosh.com/t/how-to-download-node-js-course-material/24966)

<div class="topic-metadata">

**Author:** [@Ying43699](https://forum.codewithmosh.com/u/Ying43699)\
**Replies:** 2\
**Last updated:** [February 14, 2024, 1:03am UTC](https://forum.codewithmosh.com/t/how-to-download-node-js-course-material/24966 "2024-02-14T01:03:36Z")

</div>

Hello, can anyone tell me how to download Node.js course material like exercise.js for lecture Asynchronous JavaScript? The instructor mentioned exercise.js is attached to the video and can be downloaded, but I can’t f…

---

## [Error when trying to setup the Backend](https://forum.codewithmosh.com/t/error-when-trying-to-setup-the-backend/17189)

<div class="topic-metadata">

**Author:** [@jganster](https://forum.codewithmosh.com/u/jganster)\
**Replies:** 3\
**Last updated:** [February 13, 2024, 5:39pm UTC](https://forum.codewithmosh.com/t/error-when-trying-to-setup-the-backend/17189 "2024-02-13T17:39:40Z")

</div>

I know this topic has been covered already, but the last update was over a year ago and the noted fixes do not work for me. I have opened the Backend project in VS Code for Mac and from the terminal window, I have ran th…

[Next page](https://forum.codewithmosh.com/c/node/9.md?page=1)
