我在我的角度应用程序中实现 SSR,在尝试运行npm run build:ssr它时会抛出以下错误。
我已经创建了自己的库,它是否以名称捆绑在 dist 文件夹中@asfc/shared
ERROR in projects/asfc-web/src/environments/environment.ts:1:39 - error TS2307: Cannot find module '@asfc/shared' or its corresponding type declarations.\n\n1 import { PageNotFoundComponent } from '@asfc/shared';\n ~~~~~~~~~~~~~~\n......\nRun Code Online (Sandbox Code Playgroud)\n我已将 index.ts 添加到files,但错误仍然没有消失
下面是我的,tsconfig.server.json
{\n "compilerOptions": {\n "target": "es2016",\n "module": "commonjs",\n "moduleResolution": "node",\n "allowSyntheticDefaultImports": true,\n "removeComments": false,\n "strict": false,\n "noFallthroughCasesInSwitch": true,\n "noImplicitReturns": true,\n "noImplicitAny": false,\n "noUnusedLocals": false,\n "noUnusedParameters": false,\n "experimentalDecorators": true,\n "pretty": true,\n "declaration": true,\n "outDir": "../../dist/server",\n "lib": ["es2016", "DOM"],\n …Run Code Online (Sandbox Code Playgroud)