Я установил библиотеку npm xrm-mock в основное веб-приложение ASP.Net. Он отображается в папке npm и папке node_module на диске:
![enter image description here](https://i.stack.imgur.com/rAbcQ.jpg)
У меня есть файл, расположенный по адресу test\formTemplate\contact.ts
, который пытается импортировать его в первой строке:
import { XrmMockGenerator, XrmMock } from "xrm-mock";
Но VS показывает подчеркивание "xrm-mock" как исключение (TS) Cannot find module 'xrm-mock'
Вот мой tsconfig.json, расположенный в корне моего веб-проекта:
{
"compileOnSave": true,
"compilerOptions": {
"module": "umd",
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": true,
"noImplicitThis": true,
"removeComments": false,
"sourceMap": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es5",
"types": [
"es6-promise",
"jasmine",
"steal",
"xrm"
]
},
"include": [
"./webresources/new_/common/*.ts",
"./webresources/new_/scripts/*.ts",
"./webresources/*.ts",
"./test/**/*.ts"
]
}
![enter image description here](https://i.stack.imgur.com/PQ2nF.jpg)
Нужно ли как-то указывать папку node_modules
где-нибудь?