正文Angular5 import interface 报错:XXX is not a moduleIP云V管理员/2022-10-03/3 阅读 10/03提示:扫一扫查出行【扫一扫了解最新限行尾号】复制提示在项目里定义了一个interface,device.ts。然后在component.ts中要使用这个interface,import之后,VSCode报错:‘xxx/xxx/xxx/device.ts’ is not a module。搞了半天还是没找到解决办法。后来终于在StackOverflow上找到了解决办法,那就是——重新npm start或者ng serve!!!重启大法果然好用啊!!!