1. Download the Nodejs plugin, the download address is:
https://github.com/tanepiper/SublimeText-Nodejs
After downloading the zip archive, unzip it and change the file name to Nodejs
2. Open Sublime Text3, click the menu "Perferences" => "Browse Packages" to open the "Packages" folder, and cut the Nodejs folder of Part 1 in
3. Open the file "Nodejs.sublime-build", change the code "encoding": "cp1252" to "encoding": "utf8" , and change the code "cmd": ["taskkill /F /IM node.exe & node" , "$file"] to "cmd": ["node", "$file"] , save the file
4. Open the file "Nodejs.sublime-settings", change the code "node_command": false to "node_command": "D:\\Program Files\\nodejs\\node.exe" , and change the code "npm_command": false Save the file as "npm_command": "D:\\Program Files\\nodejs\\npm.cmd"
5. Write a test file hello.js, press "ctrl+B" to run the code, the running result is shown in the following figure: