2017-10-05 245 views
0

我目前正在開發一個角度爲4的應用程序,我想使用amexio庫(https://github.com/meta-magic/amexio.github.io)。 我安裝了bootstrap,需要Tether.js & Popper.js和Font Awesome與NPM。 這是我的角cli.json風格和腳本找不到模塊:錯誤

"styles": [ 
       "../node_modules/font-awesome/css/font-awesome.css", 
       "styles/app.scss", 
       "styles.css", 
       "../node_modules/bootstrap/dist/css/bootsrap.css", 
       "../node_modules/font-awesome/css/font-awsome.min.css" 
      ], 
      "scripts": [ 
       "../node_modules/chart.js/dist/Chart.js", 
       "../node_modules/jquery/dist/jquery.min.js", 
       "../node_modules/popper.js/dist/umd/popper.min.js", 
       "../node_modules/tether/dist/js/tether.min.js", 
       "../node_modules/bootstrap/dist/js/bootstrap.js" 
      ] 

但是當我做NPM開始我得到這個錯誤:與這就是爲什麼它是給錯誤錯誤序列

ERROR in multi ./node_modules/font-awesome/css/font-awesome.css ./src/styles/app.scss ./node_modules/bootsrap/dist/css/bootsrap.css 
Module not found: Error: Can't resolve 'D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css' in 'D:\workspace\pmnnew\node_modules\@angular\cli\models\webpack-configs' 
resolve 'D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css' in 'D:\workspace\pmnnew\node_modules\@angular\cli\models\webpack-configs' 
    using description file: D:\workspace\pmnnew\node_modules\@angular\cli\package.json (relative path: ./models/webpack-configs) 
    Field 'browser' doesn't contain a valid alias configuration 
    after using description file: D:\workspace\pmnnew\node_modules\@angular\cli\package.json (relative path: ./models/webpack-configs) 
    using description file: D:\workspace\pmnnew\package.json (relative path: ./node_modules/bootsrap/dist/css/bootsrap.css) 
     no extension 
     Field 'browser' doesn't contain a valid alias configuration 
     D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css doesn't exist 
     .ts 
     Field 'browser' doesn't contain a valid alias configuration 
     D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css.ts doesn't exist 
     .js 
     Field 'browser' doesn't contain a valid alias configuration 
     D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css.js doesn't exist 
     as directory 
     D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css doesn't exist 
[D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css] 
[D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css.ts] 
[D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css.js] 
[D:\workspace\pmnnew\node_modules\bootsrap\dist\css\bootsrap.css] 
@ multi ./node_modules/font-awesome/css/font-awesome.css ./src/styles/app.scss ./node_modules/bootsrap/dist/css/bootsrap.css 
+0

字體awsome缺失嘗試並安裝並保存它 –

+0

我做了npm安裝... --save – fbm

回答

2

您已經導入的文件。請按照提及的順序。

"styles": [ 
    "../node_modules/bootstrap/dist/css/bootstrap.css", 
    "../node_modules/font-awesome/css/font-awesome.min.css", 
    "styles/app.scss", 
    "styles.css" 
    ], 
    "scripts": [ 
    "../node_modules/jquery/dist/jquery.min.js", 
    "../node_modules/popper.js/dist/umd/popper.min.js", 
    "../node_modules/tether/dist/js/tether.min.js", 
    "../node_modules/bootstrap/dist/js/bootstrap.js", 
    "../src/assets/data/prism/prism.js" 
    ],