tagged [node.js]
'node' is not recognized as an internal or an external command, operable program or batch file while using phonegap/cordova
'node' is not recognized as an internal or an external command, operable program or batch file while using phonegap/cordova I am using phonegap/cordova. Everthing is installed propelry i.e cordova, ph...
Node cannot find module "fs" when using webpack
Node cannot find module "fs" when using webpack I'm using node.js and webpack to create a bundle. From what I've read, node.js should contain `fs` module for managing files. However when I call `requi...
Defining an array as an environment variable in node.js
Defining an array as an environment variable in node.js I have an array that I pull data from. Since I'm using heroku, it may be better to replace it with an environment variable, but I'm not sure how...
- Modified
- 22 Jul at 00:56
Write a line into a .txt file with Node.js
Write a line into a .txt file with Node.js I want to use Node.js to create a simple logging system which prints a line before the past line into a .txt file. However, I don't know how the file system ...
How to install older version of node.js on Windows?
How to install older version of node.js on Windows? I need to install node.js of version 4.0.0 I tried this: But I got this message: npm is not recognized as an internal or external command, operable ...
- Modified
- 21 Nov at 23:10
What is Firebase Firestore 'Reference' data type good for?
What is Firebase Firestore 'Reference' data type good for? I'm just exploring the new Firebase Firestore and it contains a data type called [reference](https://firebase.google.com/docs/firestore/manag...
- Modified
- 15 Dec at 18:42
How do I get started with Node.js
How do I get started with Node.js Are there any good resources to get started with Node.JS? Any good tutorials, blogs or books? Of course, I have visited its official website [http://nodejs.org/](http...
- Modified
- 13 Jan at 16:5
Javascript - get array of dates between 2 dates
Javascript - get array of dates between 2 dates I'd like "range" to be an array of date objects, one for each day between the two dates. The trick is that it should handle month and year boundaries as...
- Modified
- 5 Mar at 19:27
Node.js version on the command line? (not the REPL)
Node.js version on the command line? (not the REPL) I want to get the version of Node.js on the command line. I'm expecting to run a command like: but that doesn't work. Does anybody know what the com...
- Modified
- 28 Feb at 11:57
What is process.env.PORT in Node.js?
What is process.env.PORT in Node.js? what is `process.env.PORT || 3000` used for in Node.js? I saw this somewhere: If it is used to set `3000` as the listening port, can I use this instead? If not why...
Read a text file using Node.js?
Read a text file using Node.js? I need to pass in a text file in the terminal and then read the data from it, how can I do this? How do I pass in the path from the terminal, how do I read that on the ...
- Modified
- 27 Mar at 01:6
How do I determine the current operating system with Node.js
How do I determine the current operating system with Node.js I'm writing a couple of node shell scripts for use when developing on a platform. We have both Mac and Windows developers. Is there a varia...
- Modified
- 7 Mar at 00:29
How to publish a website made by Node.js to Github Pages?
How to publish a website made by Node.js to Github Pages? I made a website using Node.js as the server. As I know, the node.js file should start working by typing commands in terminal, so I'm not sure...
- Modified
- 30 Mar at 12:43
Populate nested array in mongoose
Populate nested array in mongoose How can I populate "components" in the example document: ``` { "__v": 1, "_id": "5252875356f64d6d28000001", "pages": [ { "__v": 1, "_id": "5252875a56...
How can I specify the required Node.js version in package.json?
How can I specify the required Node.js version in package.json? I have a Node.js project that requires Node version 12 or higher. Is there a way to specify this in the `packages.json` file, so that th...
The best way to run npm install for nested folders?
The best way to run npm install for nested folders? What is the most correct way to install `npm packages` in nested sub folders? What is the best way to have `packages` in `/my-sub-module` be install...
Is it safe to store a JWT in localStorage with ReactJS?
Is it safe to store a JWT in localStorage with ReactJS? I'm currently building a single page application using ReactJS. I read that one of the reasons for not using `localStorage` is because of XSS vu...
- Modified
- 11 Mar at 17:9
How do you get a list of the names of all files present in a directory in Node.js?
How do you get a list of the names of all files present in a directory in Node.js? I'm trying to get a list of the names of all the files present in a directory using Node.js. I want output that is an...
- Modified
- 3 Feb at 14:6
How to list all versions of an npm module?
How to list all versions of an npm module? In order to see all the versions of a node module [webpack], I have executed below command in windows command prompt This command only displays first 100 ver...
Get parent directory name in Node.js
Get parent directory name in Node.js I am using Node.js, and I want to obtain the parent directory name for a file. I have the file `"../test1/folder1/FolderIWant/test.txt"`. I want to get `"FolderIWa...
How to run shell script file using nodejs?
How to run shell script file using nodejs? I need to run a shell script file using nodeJS that executes a set of Cassandra DB commands. Can anybody please help me on this.
How can I use an http proxy with node.js http.Client?
How can I use an http proxy with node.js http.Client? I want to make an outgoing HTTP call from node.js, using the standard `http.Client`. But I cannot reach the remote server directly from my network...
nodeJs callbacks simple example
nodeJs callbacks simple example can any one give me a a simple example of nodeJs callbacks, I have already searched for the same on many websites but not able to understand it properly, Please give me...
- Modified
- 4 Nov at 07:44
Get file name from absolute path in Nodejs?
Get file name from absolute path in Nodejs? How can I get the file name from an absolute path in Nodejs? e.g. `"foo.txt"` from `"/var/www/foo.txt"` I know it works with a string operation, like `fullp...
Module not found: Can't resolve 'fs' in Next.js application
Module not found: Can't resolve 'fs' in Next.js application Unable to identify what's happening in my next.js app. As is a default file system module of nodejs. It is giving the error of . [](https://...
- Modified
- 20 Nov at 08:34