3
我試圖構建Atom。當我運行npm install
時,出現錯誤:「無法找到模塊」上的node-gyp錯誤
Error: Cannot find module 'C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js'
我在Windows上。我怎樣才能解決這個問題?
我試圖構建Atom。當我運行npm install
時,出現錯誤:「無法找到模塊」上的node-gyp錯誤
Error: Cannot find module 'C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js'
我在Windows上。我怎樣才能解決這個問題?
這意味着,不知何故,node-gyp
模塊已被損壞,卸載或以其他方式搞砸了。只是腐敗或東西的情況下
核彈node-gyp
從軌道:這是可以固定在兩個簡單的步驟(TM)。以管理員身份打開PowerShell,將cd
添加到Node的安裝目錄(可能是C:\Program Files (x86)\nodejs
或C:\Program Files\nodejs
)。現在cd .\node_modules\npm\node_modules
和rm -r node-gyp
。
重新安裝node-gyp
。要做到這一點,只需運行npm install
。
對於離子框架問題,我刪除了node-gyp'npm remove node-gyp',然後運行'npm install'。固定,謝謝 – BatteryAcid