所有人,
当尝试通过安装MS Graph工具包的包时
npm install @microsoft/mgt
我收到一个错误,打字包找不到:
PS C:UsersdevDevWebpart> npm install @microsoft/mgt
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/microsoftgraph/msgraph-typescript-typings.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersdevAppDataRoamingnpm-cache_logs2020-03-11T11_44_15_649Z-debug.log
我通过nodist尝试了几个节点版本。并开始了一个新项目,取得了同样的成果。我使用Windows 10(1903(。
谢谢你的帮助。
看起来您可能没有安装git-您需要在机器中安装git才能使其工作。
undefined ls-remote -h -t ssh://git@github.com/microsoftgraph/msgraph-typescript-typings.git
应该是
git ls-remote -h -t ssh://git@github.com/microsoftgraph/msgraph-typescript-typings.git
存在与git路径相关的错误。