1. 程式人生 > >npm建立vue專案

npm建立vue專案

 

1、node.js官網下載node,並安裝;

安裝

2、window+R快捷鍵開啟cmd

npm config set prefix "D:\nodejs\node_global"

npm config set cache "D:\nodejs\node_cache"

設定淘寶映象:

npm config set registry=http://registry.npm.taobao.org

錯誤解決辦法:將專案裡的“node_modules”資料夾刪除,然後在cmd中cd到專案目錄,依次執行命令:npm install和npm run build,最後執行npm run dev後項目成功執行。

 

安裝完成啦!