Node.js安裝詳細步驟教程(Windows版)


 

Node.js安裝詳細步驟教程(Windows版)

根據上邊博客文章,完成下載及安裝。

 

問題一

npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

解決:使用管理員身份運行cmd或者windows powershell

 

問題二:npm config set prefix “XXXX”  設置后想更換

解決:刪除X:\Users\用戶名\.npmrc整個文件 或者 文件下對應的配置:

prefix =C:\Program Files\nodejs\node_global 
cache =C:\Program Files\nodejs\node_cache

  

 問題三:npm WARN Local package.json exists, but node_modules missing, did you mean to install?

解決方法:

輸入npm install 或 cnpm install 后,再次啟動

npm run dev 成功啟動!


上邊方式不行的話,嘗試:


 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM