angular / in-memory-web-api

The code for this project has moved to the angular/angular repo. This repo is now archived.
MIT License
1.18k stars 232 forks source link

Node error in prerendering with Angular Universal #209

Open actarian opened 6 years ago

actarian commented 6 years ago

When main.js is compiled for SSR with in-memory-api Module the require erroneously point to ES6 files eg. http-client-in-memory-web-api.module.js and interfaces.js

require("angular-in-memory-web-api/http-client-in-memory-web-api.module")

This will cause a Node Error. NodeInvocationException: Prerendering failed because of error: ...\Client\node_modules\angular-in-memory-web-api\http-client-in-memory-web-api.module.js:1

Instead requires should point directly to 'angular-in-memory-web-api' folder to load the dist umd module.

beleta commented 5 years ago

Did you find any workaround to this issue?