我在MacOS上,几个月前安装了Heroku CLI,今天在尝试使用命令行工具时遇到了这个错误:
Error: Cannot find module '{user profile}/.local/share/heroku/client/6.15.25-635e5c6/package.json'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at run ({user profile}/.local/share/heroku/client/6.15.25-635e5c6/node_modules/@cli-engine/engine/lib/cli.js:82:22)
at Object.<anonymous> ({user profile}/.local/share/heroku/client/6.15.25-635e5c6/bin/heroku.js:7:1)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)我尝试了brew uninstall heroku/brew/heroku,然后重新安装,错误中没有任何更改。
发布于 2018-03-14 06:54:00
我在GitHub上发现了修复它的this问题。
修复方法就是删除~/.local/share/heroku/client,它又能正常工作了。
https://stackoverflow.com/questions/49267161
复制相似问题