2017-10-05 4 views
0

현재 저는 각도 4 앱을 개발 중이며 amexio 라이브러리 (https://github.com/meta-magic/amexio.github.io)를 사용하려고합니다. 부트 스트랩을 설치했는데, Tether.js & Popper.js와 NPM이 적용된 Font Awesome이 필요합니다. 이 내 각-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

font 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" 
    ],