I am working on transforming Angular 2's 5 Minute Quickstart tutorial into an Electron app by incorporating "electron-prebuilt".
https://i.sstatic.net/wLfJy.png
However, I am facing limitations in utilizing some of Electron's advanced features, such as writing to the file system.
Although I can successfully build and run "Electrogram", I encounter an error when attempting to use certain basic functionalities within my Electron application:
Modified app.component.ts
import { Component } from '@angular/core';
import { remote, ipcRenderer } from 'electron';
import { writeFile } from 'fs';
@Component({
selector: 'my-app',
template: '<h1>My First Angular 2 App</h1><button (click)="doSomething()">Do Something</button>'
})
export class AppComponent {
doSomething() {
writeFile("c:\temp\doSomething.txt", "some data");
}
}
Error Message in DevTools Console
https://i.sstatic.net/iAbsI.png
I need guidance on configuring the app to correctly locate the Electron modules. How can this be achieved?