Hello everyone!
I downloaded node.js from the official site, installed it along this path: E: \ OpenServer \ nodejs, created a text file path.txt in openServer (… \ userdata \ config), registered the path to node.js in the text file E: \ OpenServer \ nodejs, restarting OpenServer and node.js doesn’t work. What am I doing wrong?
In the OpenServer settings, in the “Server” section, changed the path variable to Custom Path + userdata / config / path.txt + Win Path
Answer 1, authority 100%
You need to follow these simple steps to install Node.js (npm is part of node.js) on OpenServer
1. Installing NodeJS
Go to https://nodejs.org/ and download the “Recommended For Most Users” version.
Install NodeJS as a regular Windows program
2. Adding NodeJS to OpenServer
- open OpenServer PREFERENCES
- go to SERVER tab
- in “setting the use of the Path variable” select from the drop-down list “Custom Path + userdata / config / path.txt + Win Path”
- SAVE changes
3. Creating the path.txt file
in the OpenServer package, we go to * \ userdata \ config * create the file path.txt
Open the generated path.txt file and add the path to nodejs in it. I have this “* C: \ Program Files \ nodejs *”
Save the changes in the file and so that openserver can pick up nodejs, you must RESTORE OPEN-SERVER
4. Checking
Open an OpenServer console and write node -v
or npm -v
If you saw the version – congratulations!
If not, make sure that all settings are saved and restart the server again
Answer 2
Try this: Install usually on Windows node.js (LTS version).
1) open Windows command line and write npn -v If you see a version for example: 6.4.1 then everything works.
2) Now let’s configure adding NodeJS to the ConEmu console – those Openserver:
settings / Server: and you look in the window "setting the use of the Path variable": choose: Your Path + Win Path
3) should work in any directory: npn -v == (your version) eg 6.4.1
good luck with development 🙂