Update to Angular v6 - Module not found: Error: Can't resolve 'fs'
I'm trying to migrate my Angular Universal project from Angular v5 to v6 I've got a service where I use fs to load the translation on the server side. Everything works well with Angular v5. With Angular v6, when I run npm run start aka ng serve --proxy-config proxy.conf.json I face the following error ERROR in ./src/providers/core/translate/translate-universal-loader.service.ts Module not found: Error: Can't resolve 'fs' in '/Users/me/Documents/projects/myproject/src/providers/core/translate' In my service I declare fs like the following: declare var require: any; const fs = require('fs'); I