Problem with installing Node.JS on Windows - javascript

I'm trying to install Node.JS on Windows 7 with help of this tutorial.
I downloaded Cygwin, installed it. I have installed Python 2.7.
After this i downloaded last version of Node.JS in tar.gz. Than I opened cygwin bash and typed this command there:
tar zxvf node<tab>
It unzipped it to directory: node-v0.4.2
But what i need to do if i have python installed?
I tried to type:
make test
and got error message: make: command not found
I will be very grateful for any help!

Did you install all the required packages? Run setup.exe again and check.

I think the issue might be that the environment variables in Cygwin need to be configured:
Getting Make to place nice with Cygwin

Related

When running Ubuntu 20.04, using start command in the VSCode terminal gives "Permission Denied" error

I am trying to learn how to use CLI and am very new to Javascript, so my apologies in advance.
I'm running WSL Ubuntu for a class and trying to code in VSCode. I'm running into an error where I want to open the index.html file in my google chrome browser using the CLI so I figure I should use the 'start' command. I type into the VSCode terminal 'start index.html' and receive the following error:
/mnt/c/MinGW/msys/1.0/bin/cmd: 8: : Permission denied
My research tells me I need to use chmod somewhere but I'm at a loss of where or exactly what I should be doing with it.
Thanks
If you use WSL better source directory use better in WSL path.
My case is all working directory in WSL, and Termial start in WSL $home.
ex) git, npm, python, php etc. I just install all in WSL.
even If can access able windows folder will be slow.
my recommand is all command or tool install in WSL also work directory

'run-s' is not recognized as an internal or external command, operable program or batch file

I surprisingly got that issue out of nowhere, when I was trying to use the npm link command testing my local package. Any thoughts?
Windows 10
node 15.9.0
npm 8.12.2
Seems that the issue was because my npm version didn't match my node version.
I was trying to install that 'run-s' package globally but it didn't help. I checked my environment variables but it didn't help either.
After all I just simply uninstalled nodejs, deleted all the files that it left and installed the needed version again (12.22.12 in my case) using "windows-nvm" and now everything runs smoothly.
Now my NodeJS version is 12.22.12
my NPM version is 6.14.16
Hope it will help somebody

npm could not find module '../lib/npm.js'

I am trying to use nodejs and npm on a CentOS 7 machine. The machine cannot connect to the Internet, so I copy the node-v6.2.1-linux-x64 folder with some lib modules inside to the machine. But the output shows Error: Cannot find module '../lib/npm.js'. I wonder if it is the correct way to install nodejs offline or modules. Any helps? Thx.
It wouldn't work because the node modules depend to your operating system.
For example , lets say I have a project with tons of node dependencieses and I ran npm install on my Microsoft machine, when I copy my files and try to run it in Apple , it wouldn't work.
You have to use npm i seperetly on different machines.
Maybe this link here can help you to get your npm modules without internet . ==>
https://github.com/npm/npm/issues/1349

Cannot run globally installed node modules in Windows 7

Note: I have tried almost all similar posts related to this issue and found nothing was helpful to me. Hence posting this.
Issue: I'm trying to install http-server package in my Windows 7 machine using npm install http-server -g, Installation was fine, however when I try to execute it using http-server command in the command line I'm getting an error saying, 'http-server' is not recognized as an internal or external command, operable program or batch file. I have also tried the same steps for gulp and the result was the same.
I have tried setting the Node Path as, set NODE_PATH=%AppData%\npm\node_modules; but no luck.
Can someone shed some light here?
Thanks,
Dave
Global packages needs to be installed using and administration console (CMD / Run as Administrator)

Node.js says it can't load sqlite3 module, but does anyway

I'm working with the new Node.js Tools for Visual Studio and included the sqlite3 npm module. When I call require('sqlite3') it throws the error:
Error: Cannot find module './binding\Debug\node-v11-win32-ia32\node_sqlite3.node'
Odd thing is, when I ignore the error and continue running the code, everything works fine...until the function I'm in returns; then the server crashes.
Has anyone else had this issue? I have a suspicion that it has something to do with the ./binding part, but wouldn't know where to begin in terms of finding out why.
use this:-
npm install sqlite3 --build-from-source
This is what worked for me: https://www.npmjs.com/package/sqlite3
npm install https://github.com/mapbox/node-sqlite3/tarball/master
From: https://github.com/mapbox/node-sqlite3/wiki/Building-On-Windows
Install required software:
Python 2.x: https://www.python.org/downloads/release/python-2711/
Win SDK: http://www.microsoft.com/en-us/download/details.aspx?displayLang=en&id=8279
Microsoft Visual Studio 2010+: https://www.microsoft.com/es-es/download/details.aspx?id=48217
Build:
npm install sqlite
npm install
node-gyp configure build
I got the kind of problem, my node version is v10.16.3
This globally installed sqlite3 gives error in loading by require('sqlite3')
It been solved by install a sqlite3 local to project.
$ npm install sqlite3
Note without -g option, it works for me.
It seems this is a problem with the sqlite3 npm package itself. There exists a lib\binding\Release\ folder, but not a lib\binding\Debug\ folder. I just created a copy of the Release folder, named it Debug, and all is well.
In case this above has not worked for anyone, here is what worked for me:
sudo apt install node-sqlite3
(I am using Ubuntu with Vscode as editor). It seems installing this node-sqlite3 module was the one that was recognized.
To skip searching for pre-compiled binaries, and force a build from source, use
npm install --build-from-source

Categories

Resources