Reputation: 51
I am using @nguniversal/express-engine to Server Side Rendering in angular.When I run $ nmp build:ssr
or $ npm run dev:ssr
i get this error.
ERROR in error TS6053: File 'C:/dev/web/workspace/project/src/server.ngtypecheck.ts' not found.
error TS6053: File 'C:/dev/web/workspace/project/src/server.ts' not found.
error TS6053: File 'C:/dev/web/workspace/project/src/src/main.server.ngtypecheck.ts' not found.
error TS6053: File 'C:/dev/web/workspace/project/src/src/main.server.ts' not found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:ssr: `ng build --prod && ng run client:server:production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Upvotes: 3
Views: 3383
Reputation: 110
Had the same issue, the doubling-up of src/src
is occurring from tsconfig.server.json. I encountered this error running build:ssr for Angular, the solution as described here: npm run build:ssr does not work in angular 8 is quite simple. We need to edit the src/tsconfig.server.json.
I had to make two changes; both were described in that solution.
Navigate to src/tsconfig.server.json
src/main.server.ts
to main.server.ts
,server.ts
to ../server.ts
.Props to the other thread for the solution really,
Upvotes: 8