node-學習之路01 npm

來源:互聯網
上載者:User

標籤:bubuko   dev   image   依賴   安裝   檔案   模組   img   使用   

1.node環境快速搭建網址 搭建環境的地址2.前端知識網址  點擊我3.npm 使用

node -v 查看版本

npm -v查看版本

搜尋去www.npmjs.com

npm install 包名 安裝這個包

npm remove 包名 刪除包 

npm install 包名 -g 全域安裝 

npm install 包名 --save  安裝到依賴中 (dependencise中) 為什麼安裝在依賴中,因為上傳到git的時候,我們是不需要上傳node_module的,只上傳package.json,   使用npm install 根據package.json中依賴下載 (目前使用npm 5.6.0發現不使用--save也可以安裝到依賴中)

npm install 包名 --save-dev  安裝到開發環境中(devDependencise中)

npm跟跟著nodeJS一起下載過來的,使用方法

4. npm install math(t添加math模組)

由於後面沒有添加dev所以是生產環境使用的模組

使用npm 下載大的檔案,容易卡死,此時我們可以配置一個cnpm 

 

node-學習之路01 npm

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.