Sublime Text 3 Build Nodejs Environment

Source: Internet
Author: User
Tags sublime text

1.Node Js installation (in Windows environment)

Download the node. JS official website Download package https://nodejs.org/en/download/, or in the domestic http://nodejs.cn/download/site download

2.Sublime Text 3 Installation Nodejs Environment

After installing sublime text 3, you need to configure the package Control. The installation method is as follows:
1) Open Sublime text 3.
2) Press CTRL + ' ' to open the console.
3) Enter the following to install.

Import Urllib.request,os,hashlib; h =' 2915d1851351e5ee549c20394736b442 ' +' 8bc59f460fa1548d1514676163dafc88 '; PF = ' package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by = Urllib.request.urlopen ( ' http://packagecontrol.io/' + PF.) replace ( ", "%20 "). read (); DH = hashlib.sha256 (by). Hexdigest (); Print ( "Error validating Download (got%s instead of%s), please try manual install '% (DH, h)) if dh! = h else open (Os.path.join (IPP, pf),  WB). write (by)        

4) in Preferences->package control, open the package control.

5) Enter the install package.
6) Input node js, select Install JavaScript & NodeJS snippets.sublime-package.

After the installation is successful, create a new JS file and enter Console.log ("Hello World"); Then run the test using CTRL+B. If the output of hello in the console of sublime indicates that the environment was installed successfully. As shown in the following:

1) Open the Nodejs folder, locate the file "Nodejs.sublime-build", Modify "encoding": "cp1252", For "encoding": "Utf-8".

Restart Sublime Text 3 rerun Nodejs

Sublime Text 3 Build Nodejs Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.