找不到模块:错误:无法解析,但是模块在node_modules中

时间:2019-06-05 12:25:44

标签: angular typescript microsoft-graph

我的应用程序的构建产品有问题。 构建因错误而失败,但是所有内容均由构建生成。它失败了,但是除了以下错误之外,一切都很好。

Module not found: Error: Can't resolve '@microsoft/microsoft-graph-types' in 'D:/path/to/a/file'

这是提到的文件的内容

import { Calendar, Event as MicrosoftEvent } from '@microsoft/microsoft-graph-types';

如果我在VS Code中删除此行,则无法再自动导入。

当我运行“ ng serve”和“ ng test”时,它运行完美。只有以下命令失败

ng build --prod --aot --vendor-chunk --common-chunk --delete-output-path --buildOptimizer

@ microsoft / microsoft-graph-types是一个dev依赖项(dependecy也是相同的),我使用的是1.8.0版。

感谢您的帮助。

0 个答案:

没有答案
相关问题