Hello, I am currently working with Angular 7.
I recently attempted to utilize the fs module in Typescript to open a directory. However, I encountered an error message stating: "Module not found: Error: Can't resolve fs". Despite having types@node and file-system installed, the issue persisted.
Below is a snippet of my code:
import {Component, OnInit} from '@angular/core';
import * as fs from 'file-system';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'my-app';
constructor() {
}
ngOnInit() {
console.log(fs);
}
}
If you have any insight or solutions, please feel free to share them with me.
Additional information: Node: v10.14.0 Npm: v6.4.1 Angular CLI: v7.1.1