npm Error: Cannot find module 'are-we-there-yet'

npm 損壞了,are-we-there-yet是npm所依賴的npmlog依賴的一個包,從新安裝npm便可:node

➜ lib npm module.js:550
    throw err; ^ Error: Cannot find module 'are-we-there-yet' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:2:16) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)

解決辦法:npm

cd /usr/local/lib/node_modules mv npm /tmp sudo curl -L registry.npmjs.com/npm/-/npm-6.13.7.tgz |sudo tar xz --transform="s:^package:npm:"~ npm -v 6.13.7
npm-6.13.7.tgz 是我使用的版本,你也能夠在官網查詢相應的版本號。 https://www.npmjs.com/package/npm

 

 參考:curl

https://stackoverflow.com/questions/31025048/npm-doesnt-work-get-always-this-error-error-cannot-find-module-are-we-theui

相關文章
相關標籤/搜索