Update to Angular v6 - Module not found: Error: Can't resolve 'fs'

前端 未结 12 2446
栀梦
栀梦 2020-11-30 06:04

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.

12条回答
  •  独厮守ぢ
    2020-11-30 06:33

    The accepted answer is correct; you can't use fs anymore in Angular v6+.

    However, this alternative builder (it's an extension to the Angular CLI) allows you to target an Electron environment and have full access to Electron's features:

    https://github.com/angular-guru/electron-builder

提交回复
热议问题