First, check whether Node.js is successfully installed: node --server. If you can see the version number, it means the installation is successful.
Then execute: npm install -g browser-sync command, usually no error will be reported.
If it still doesn’t work, try running it with administrator rights.
If it still doesn’t work, I wonder what your operating system is? If it is Windows 7 or above, it is recommended to use PowerShell to perform the installation instead of using the ancient command line method. PowerShell is Microsoft's software replacement for the command line tool, which is usually built-in. It not only supports Dos commands, but also commonly used Linux commands. It is simply an operation and maintenance artifact.
If it still doesn’t work, open the Browser-sync official website and take a closer look at its five-minute introductory tutorial:
replyExcuse me, the picture above is the result displayed after I entered the npm install -g browser-sync command.
Please tell me, does this mean the installation was successful or failed?
First, check whether Node.js is successfully installed: node --server. If you can see the version number, it means the installation is successful.
Then execute: npm install -g browser-sync command, usually no error will be reported.
If it still doesn’t work, try running it with administrator rights.
If it still doesn’t work, I wonder what your operating system is? If it is Windows 7 or above, it is recommended to use PowerShell to perform the installation instead of using the ancient command line method. PowerShell is Microsoft's software replacement for the command line tool, which is usually built-in. It not only supports Dos commands, but also commonly used Linux commands. It is simply an operation and maintenance artifact.
If it still doesn’t work, open the Browser-sync official website and take a closer look at its five-minute introductory tutorial:
http://www.browsersync.cn/#install