Where is the javascript-BrowserSync running method incorrect?

Source: Internet
Author: User
Tags install node
Install Node in the browser synchronization test tool www.browsersync.cn. jsBrowserSync is based on Node. js is a Node module. If you want to use it quickly, you may need to install Node first. js installation is applicable to MacOS, Windows, and Linux. An...

Http://www.browsersync.cn/
Time-saving browser synchronization test tool

  1. Install Node. js

BrowserSync is based on Node. js and is a Node module. If you want to use it quickly, you may need to install Node. js first.
Installation is applicable to Mac OS, Windows, and Linux.

  1. Install BrowserSync

You can choose to install BrowserSync from the Node. js package management (NPM) Library. Open a terminal window and run the following command:

Npm install-g browser-sync
You tell the Package Manager to download the BrowserSync files and install them globally. You can use them in all projects (any directory.

You can also use the gulpjs or gruntjs build tool to run the following command in the project you want to build:

Problems encountered

Npm has installed version 2.7.4
Git also installed version 2.5.1.windows.1. Do you know if it is related to this version?
Npm install-g browser-sync has been installed. In the node_modules directory!
What is the situation? I cannot solve the first problem a newbie has encountered.

Reply content:

Http://www.browsersync.cn/
Time-saving browser synchronization test tool

  1. Install Node. js

BrowserSync is based on Node. js and is a Node module. If you want to use it quickly, you may need to install Node. js first.
Installation is applicable to Mac OS, Windows, and Linux.

  1. Install BrowserSync

You can choose to install BrowserSync from the Node. js package management (NPM) Library. Open a terminal window and run the following command:

Npm install-g browser-sync
You tell the Package Manager to download the BrowserSync files and install them globally. You can use them in all projects (any directory.

You can also use the gulpjs or gruntjs build tool to run the following command in the project you want to build:

Problems encountered

Npm has installed version 2.7.4
Git also installed version 2.5.1.windows.1. Do you know if it is related to this version?
Npm install-g browser-sync has been installed. In the node_modules directory!
What is the situation? I cannot solve the first problem a newbie has encountered.

It may be because you have not configured the PATH of Node. js to the path environment variable.

Inputbrowser-syncHe will use the require () system provided by node to find the locally installed browser-sync module.

You enter

browser-sync

Similar to the following example:

node> var browserSync = require('browser-sync');> browserSync()

Solution: Right-click my computer and choose "properties"> "System Properties"> "advanced options"> "environment variable"> "Search for path" in the system variable and edit the variable value to copy the Node path to the end.

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.