Ich bin ein neuer Programmierer auf angular2. Ich habe ein Problem, wenn ich mit angular cli kompiliere.Kompilierfehler: Modul 'util' konnte nicht gefunden werden
Ich erzeuge Winkel 2 Projekt von Winkel cli. Ich versuche debuglog
Modul auf node_modules/@types/node
durch Importmodul wie folgt zu verwenden: import {debuglog} from "util";
Ich benutze Webstorm IDE für entwickeln und die IDE nicht Warnung oder Fehler mit meinem Import. Ich überprüfte und fand debuglog
Modul im Pfad: myproject/node_modules/@types/node/index.d.ts
.
Was ist falsch in meinem Code? Haben Sie einen Vorschlag, um es zu beheben?
Projekt auf Github: https://github.com/sinhpn92/angular2-example-types-node
Version von Umgebungen:
@angular/cli: 1.0.0-rc.1
node: 7.7.1
os: darwin x64
@angular/common: 2.4.9
@angular/compiler: 2.4.9
@angular/core: 2.4.9
@angular/forms: 2.4.9
@angular/http: 2.4.9
@angular/platform-browser: 2.4.9
@angular/platform-browser-dynamic: 2.4.9
@angular/router: 3.4.9
@angular/upgrade: 2.2.4
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.9
Können Sie 'systemjs.config.js' hinzufügen? – Smit
Ist es notwendig? Dieses Projekt generieren aus Winkel cli und es Arbeit ist in Ordnung, wenn dieses Problem nicht –