2017-10-16 4 views
0

(ng new)で作成されたAngularアプリケーションに、bootstrapを追加して、.angular-cli.jsonファイル - ng serveから参照すると、ブートストラップを追加しました。Angular-cliとwebpackのエラー

ERROR LOG 

ERROR in multi ./src/styles.css C:/server/node_modules/bootstrap/dist/css/bootstrap.css 
Module not found: Error: Can't resolve 'C:\server\node_modules\bootstrap\dist\css\bootstrap.css' in 'C:\dev\mean\ems-mean\client\node_mod 
ules\@angular\cli\models\webpack-configs' 
resolve 'C:\server\node_modules\bootstrap\dist\css\bootstrap.css' in 'C:\dev\mean\ems-mean\client\node_modules\@angular\cli\models\webpac 
k-configs' 
    using description file: C:\dev\mean\ems-mean\client\node_modules\@angular\cli\package.json (relative path: ./models/webpack-configs) 
    Field 'browser' doesn't contain a valid alias configuration 
    after using description file: C:\dev\mean\ems-mean\client\node_modules\@angular\cli\package.json (relative path: ./models/webpack-confi 
gs) 
    No description file found 
    no extension`enter code here` 
     Field 'browser' doesn't contain a valid alias configuration 
     C:\server\node_modules\bootstrap\dist\css\bootstrap.css doesn't exist 
    .ts 
     Field 'browser' doesn't contain a valid alias configuration 
     C:\server\node_modules\bootstrap\dist\css\bootstrap.css.ts doesn't exist 
    .js 
     Field 'browser' doesn't contain a valid alias configuration 
     C:\server\node_modules\bootstrap\dist\css\bootstrap.css.js doesn't exist 
    as directory 
      C:\server\node_modules\bootstrap\dist\css\bootstrap.css doesn't exist 
    [C:\server\node_modules\bootstrap\dist\css\bootstrap.css\package.json] 
    [C:\server\node_modules\bootstrap\dist\css\bootstrap.css] 
    [C:\server\node_modules\bootstrap\dist\css\bootstrap.css.ts] 
    [C:\server\node_modules\bootstrap\dist\css\bootstrap.css.js] 
    [C:\server\node_modules\bootstrap\dist\css\bootstrap.css] 
    @ multi ./src/styles.css C:/server/node_modules/bootstrap/dist/css/bootstrap.css 
+0

のご意見を。それはトリックを行うように見えた – CodeTzu

答えて

0

問題は、モジュールへの絶対アドレスを提供することができないということです、これを試してください:M98のおかげで@

"../node_modules/bootstrap/dist/css/bootstrap.css" 
関連する問題