私はng4-material-dropdownを使用して、プロジェクトのルートフォルダからnpm install ng4-material-dropdown --save
を呼び出すことによってパッケージをインストールしました。このフォルダが/node-components
の中に存在することを確認できますが、app.module.ts
にインポートするとエラーが発生します。角4エラーローディングコンポーネント
インポート
import { Ng4DropdownModule } from 'ng4-material-dropdown';
エラー
Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/ng4-material-dropdown patchProperty/desc.set/[email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:1055:30 [email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17 [email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28 ZoneTask/[email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:486:28 Error loading http://localhost:3000/ng4-material-dropdown as "ng4-material-dropdown" from http://localhost:3000/app/app.module.js Stack trace: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/ng4-material-dropdown patchProperty/desc.set/[email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:1055:30 [email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17 [email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28 ZoneTask/[email protected]http://localhost:3000/node_modules/zone.js/dist/zone.js:486:28 Error loading http://localhost:3000/ng4-material-dropdown as "ng4-material-dropdown" from http://localhost:3000/app/app.module.js
これはおそらく非常にrooky間違いですが、私は私の人生のためにこれを把握することはできません。
:それをこのような何かを追加してみてください(SystemJS)XHRエラー(404が見つかりません)' – yurzui
ああを、私は角度のCLIを使用したことがありません。私はただ確認するために二重チェックしましたが、そのファイルは私のために存在しません。 – Senshi
yurzuiがいいですよ、systemjs.config.js Senshiはありますか? – bgraham