![](/img/trans.png)
[英]How to make Webpack use project's “node_modules” in js scripts located outside the project folder?
[英]How to install node modules to a folder outside the project folder?
我正在運行一個 React 項目, npm install
將所有模塊安裝在項目的根文件夾中,它會在其中創建大約 30 000 個新文件,這會減慢 dows web 雲同步(我無法排除位置)。 如何將這個大目錄安裝在不同的位置,即項目文件夾之外或者可能以某種方式全局安裝?
我試過npm install -g
刪除 node_modules 文件夾后,但說一切都是最新的, npm list -g
只顯示一項,即項目。 之后運行npm start
不起作用,給出錯誤'react-scripts' is not recognized as an internal or external command
學習Next JS
,嘗試做服務端渲染
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.