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
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.
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
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.
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-sync
He 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.