After searching a lot of documents, the sublime Text3 Nodejs plugin was successfully installed. In order to archive, but also for the convenience of friends with the same needs, its installation process is detailed record as follows
Installing Nodejs
Although the Nodejs official website provides the MSI file of node, but I tried several times under the Win7 system, can not be installed successfully, and there will be your system have not been modified ... The prompt. Finally, I used another method to successfully install the Nodejs
1. Download Node.exe
2, download the latest version of the NPM ZIP format compression Package
3, in a certain location of the hard disk, such as the D disk under the establishment of a file Nodejs, the above two downloaded things are put here, NPM to unzip
4. Configure two environment variables: one is the directory D:\nodejs to add Node.exe on PATH, one is to increase the environment variable Node_path, the value is D:\nodejs\node_modules
5, install Express: Open the cmd command line (in the Nodejs directory, hold down the shift button, then right-click, the "Open command Window Here" option and click), use the command line to navigate to this node directory, type the instructions NPM install Express
6, after the installation is complete, enter NODE-V in the command line if the output Nodejs version is installed successfully
Download and set up the Nodejs plugin
?? To Https://github.com/tanepiper/SublimeText-Nodejs
?? Download the zip archive and unzip it and change the file name to Nodejs
?? Open the sublime Text3, click the Menu "Perferences" and "Browse Packages" to open the "Packages" folder and cut the Nodejs folder in the previous step
Configuration parameters
?? 1, open the file "Nodejs.sublime-build", change the code, change the "encoding": "cp1252"
"encoding": "utf8"
code "cmd": ["taskkill /F /IM node.exe & node", "$file"]
"cmd": ["node", "$file"]
, save the file
?? 2, first find Nodejs installation path, my Computer Nodejs installation path for "D:\nodejs". Then open the file "nodejs.sublime-settings", change the code, change the "node_command": false
"node_command": "D:\nodejs\node.exe"
code "npm_command": false
"npm_command": "D:\nodejs\npm.cmd"
, save the file
Test
?? Write a test file test.js, press "Ctrl+b" to run the code, run the result as shown below
Detailed installation diagram of Nodejs plugin for sublime under Windows environment