All Questions
29 questions
0
votes
1
answer
26
views
Using fnm on Windows CMD: "failed printing to stdout: The pipe is being closed" Error
I'm trying to set up Node.js using fnm on my Windows machine (using the Command Prompt). I installed fnm via winget and then installed Node.js version 22 with the following commands:
winget install ...
-1
votes
1
answer
176
views
C:\Program Files\nodejs\node.exe: --r= is not allowed in NODE_OPTIONS
I installed Node.js on a new laptop. I cloned my Next.js project from Github and ran npm install for installing node modules, which ran properly.
To run my local development server, I am running npm ...
0
votes
0
answers
15
views
Is there a way to run JS file using node.js via cmd without using full path to the file [duplicate]
I am trying to run test.js via cmd which is not located in the current directory.
When I run:
"node test.js" I get "Error: Cannot find module" error.
When I run:
"node C:\temp\...
0
votes
1
answer
84
views
How to Start a Universal Windows App (UWP) with Environment Variables Programmatically?
I am trying to launch a Universal Windows App (UWP) with environment variables using Node JS in Windows 10 and above.
I was able to successfully launch the app with the following command:
exec("...
0
votes
1
answer
147
views
Set environment variable not reflected in process.env
I have the following code
console.log(process.env.VAR_X) in app.js
When I run node app, it gives me undefined.
I run this on VS Code powershell on Windows 11.
I have also set the environment variable ...
2
votes
0
answers
301
views
Missing Environment Variables in VS Code Terminal Process
I have an environment variable called DEBUG, whose value is the string "true". I'm reading this variable from within a Node process (itself a child process of cmd.exe) via process.env.DEBUG:
...
1
vote
2
answers
883
views
Setting environment variable in Windows 11, using 'set' and 'export', but didn't work
I am currently using Windows11, and working on the node.js project.
In the index.js, I am trying to read the current env variable by
console.log(`NODE_ENV: ${process.env.NODE_EVN}`);
And I set the ...
0
votes
1
answer
314
views
How do I pass through an envrionment variable via npm script?
Here is my current package.json
{
"dependencies": {
"cypress": "^6.8.0",
"cypress-tags": "^0.0.21",
"typescript": "^4.2.3&...
2
votes
2
answers
4k
views
Environment variables not changing in Node.js
set NODE_ENV=production not working in my pc. NODE_ENV is not changing from "development"
if(app.get('env') === 'development'){
app.use(morgan('tiny'));
console.log("Morgan ...
0
votes
1
answer
276
views
process.env.ENV_VARIABLE throws undefined value on windows
Im trying to call global system variable on windows inside my JavaScript code
helper.clearAndEnterValue(UsernameInputField, process.env.DEV_USER);
console.log throws undefined
however i can ...
0
votes
2
answers
3k
views
Environment variable in Node.js (VS Code) is undefined
I am trying to set a environment variable in Windows 10 command line with this command:
set NODE_ENV=production
When I use echo %NODE_ENV%, it is working just fine.
But when I use process.env....
71
votes
7
answers
219k
views
How to use the NODE_OPTIONS environment variable to set the max_old_space_size globally in Windows?
Workaround to fix heap out of memory when running node binaries (which is a common issue when using TypeScript 2.1+ and webpack) is increasing the max mem for node.
increase-memory-limit
is a ...
14
votes
4
answers
35k
views
gyp ERR! stack Error: Can't find Python executable
I've removed node-modules, reinstall it, tried to install npm install --global node-gyp, cleaned force cache and other
error C:\Users\me\work\proj\node_modules\sha3: Command failed.
Exit code: 1
...
1
vote
1
answer
3k
views
error syscall spawn C:\Windows\system32\cmd.exe
Whenever I try to run any nodejs project I am getting an error showing that error syscall spawn C:\Windows\system32\cmd.exe. The same error is hitting for all the nodejs projects. The problem was ...
17
votes
3
answers
36k
views
How do I see the contents of process.env using bash?
Using the integrated Bash terminal in VS Code on Windows 10, I can access individual properties of the Node process.env object using echo $PROPERTYNAME, but I can't figure out how to list all of them. ...