Webpack installation under Mac

Source: Internet
Author: User

Recently started contacting the build tool Webpack, the company computer is Windows, and my own is Mac. Originally thought in their own computer installation is very simple, but a bit of a problem, so write to share the next.

Here is the NPM installation, first you want to install node. js, here is the address https://nodejs.org/en/download/

node. JS installation I'm not going to say much, it's very simple and common software installation is no different.

When node. JS is installed, you are installing node and NPM, below we open the Terminal Execution command to view the following:

Node-v "View node version", npm-v "View NPM version"

Ok, the interface is installed through NPM Webpack, in the terminal input:

-G indicates global installation

NPM Install Webpack-g

These operations are all fine under Windows, but I have an error installing Webpack on my Mac.

The reason analysis is: Under the Mac dependent package to write to the system important folder, because did not get root permission, so the write failed, causing the installation to fail.

One more step for Mac is that the terminal performs the following command first

$ sudo-s

After execution will appear the small key, you enter what will not show up, directly enter your power-on password and then in the return on it.

Get root after you go to install Webpack on the ~

Webpack installation under Mac

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.