Angular 在nx工作区内的nativescript中使用自定义typescript路径时出错
在nx工作区中创建的nativescript应用程序中使用自定义路径时遇到一些问题 运行npm run start.android时,出现以下错误:Angular 在nx工作区内的nativescript中使用自定义typescript路径时出错,angular,typescript,nativescript,nrwl,Angular,Typescript,Nativescript,Nrwl,在nx工作区中创建的nativescript应用程序中使用自定义路径时遇到一些问题 运行npm run start.android时,出现以下错误: 错误:com.tns.NativeScriptException:未能找到模块:“@libs/installations/installations.component”,相对于:app/tns_modules/ 我需要使用自定义类型脚本路径(在tsconfig.json中设置),以便能够将nx工作区中的共享库导入nativescript应用程序
错误:com.tns.NativeScriptException:未能找到模块:“@libs/installations/installations.component”,相对于:app/tns_modules/
我需要使用自定义类型脚本路径(在tsconfig.json中设置),以便能够将nx工作区中的共享库导入nativescript应用程序
示例路径:
"paths": {
"@b2b/*": [
"apps/b2b/src/app/*"
],
"installations/*": [
"dist/installations/*"
],
"@libs/installations/*": [
"libs/installations/src/lib/*"
]
}
与问题没有直接关系,只是一个建议。NativeScript组织现在正在创建NativeScript schematics,这是一个为Angular Web和NativeScript Angular创建代码共享项目(如NX monorepo)的工具。