我正在尝试编译我的第一个有角度的应用程序,但是ng serve会出现此错误:
ERROR in ./src/styles.css (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./src/styles.css) Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: ENOENT: no such file or directory, open '/assets/css/flaticon/flaticon.css'
at Object.openSync (fs.js:451:3)
at Object.readFileSync (fs.js:351:35)
at Storage.provideSync (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:98:13)
at CachedInputFileSystem.readFileSync (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:259:32)
at Observable.rxjs_1.Observable.obs [as _subscribe] (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@ngtools/webpack/src/webpack-input-host.js:35:51)
at Observable._trySubscribe (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@ngtools/webpack/node_modules/rxjs/internal/Observable.js:44:25)
at Observable.subscribe (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@ngtools/webpack/node_modules/rxjs/internal/Observable.js:30:22)
at SyncDelegateHost._doSyncCall (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@angular-devkit/core/src/virtual-fs/host/sync.js:22:20)
at SyncDelegateHost.read (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@angular-devkit/core/src/virtual-fs/host/sync.js:49:21)
at WebpackCompilerHost.readFileBuffer (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@ngtools/webpack/src/compiler_host.js:161:44)
at VirtualFileSystemDecorator.readFile (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@ngtools/webpack/src/virtual_file_system_decorator.js:42:54)
at Promise (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/styles.js:44:35)
at new Promise (<anonymous>)
at Object.load (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/styles.js:43:28)
at loadImportContent (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/postcss-import/index.js:236:34)
at Promise.all.resolved.map.file (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/postcss-import/index.js:210:18)
at Array.map (<anonymous>)
at Promise.resolve.then.then.resolved (/Applications/XAMPP/xamppfiles/htdocs/WebDental_Angular2_IEB/node_modules/postcss-import/index.js:209:18)
at process.internalTickCallback (internal/process/next_tick.js:77:7) ERROR in The Angular Compiler requires TypeScript >=3.4.0 and <3.6.0 but 3.7.4 was found instead.
Npm 6.7.0
Angular CLI:8.3.21
节点:11.3.0
OS:darwin x64
角度:8.2.14
包装@ angular-devkit /建筑师0.803.21
@@ angular-devkit / build-angular0.803.21
@@ angular-devkit / build-optimizer0.803.21
@@ angular-devkit / build-webpack0.803.21
@@ angular-devkit / core8.3.21
@@ angular-devkit / schematics8.3.21
@ angular / cli8.3.21
@@ angular / http6.1.10
@@ ngtools / webpack8.3.21
@ schematics /角度8.3.21
@ schematics /更新0.803.21
rxjs6.5.4
打字稿3.7.4
webpack4.39.2
谢谢。
尝试导入不带/
infront的文件
styles.css
@import url('assets/css/flaticon/flaticon.css');
styles.css
/* You can add global styles to this file, and also import other style files */
@import "/assets/css/flaticon/flaticon.css";
@import "/assets/css/glyphicons-fonts/glyphicon.css";
@import "~bootstrap/dist/css/bootstrap.css";
@import "~font-awesome/css/font-awesome.css";
@import '~ngx-toastr/toastr.css';
.p0{
padding: 0;
}
.DisplayOff{
display: none !important;
}
.test-fort{
font-weight: 700;
}
.lb-topo{
display: inline !important;
}
.frm-topo{
text-align: left;
}
.frm-lf{
text-align: left;
}
.finc-lista-relatorio{
min-height: 300px;
/*height: 300px;*/
}
.finc-lista-relatorio div>table>thead>tr>th{
font-size: 13px;
}
.bckg-c{
background-color: #e4e5e6;
}
.finc-top-bord{
border-bottom: 1px solid #BBB;
background-color: #dcdcdc;
}
.finc-select-itens{
height: 100px;
}
.finc-bt-top a strong {
color: #212529;
}
.finc-bt-top:hover, .finc-bt-top a:hover{
cursor: pointer;
color: #c70f0f;
text-decoration: none;
/* background-color: green; */
}
.finc-bt-top.disabled,
.finc-bt-top.disabled:hover,
.finc-bt-top.disabled i,
.finc-bt-top.disabled:hover a,
.finc-bt-top.disabled a i {
color: #afafaf;
cursor: not-allowed;
pointer-events: none;
}
.frm-bt-unic button{
margin-top: 18px;
float: left;
}
.finc-table thead>tr>th{
padding: 0;
}
.finc-table thead>tr>th, .finc-table tbody>tr>td{
padding: 5px 0px 5px 0px !important;
}
.renegociar-table thead>tr>th, .renegociar-table tbody>tr>td {
padding: 0.50rem 0.75rem!important;
}
#finc-tb.table-striped>tbody>tr:nth-of-type(odd),
#finc-tb.table-striped>tbody>tr:nth-of-type(even){
/* background-color:rgba(160, 222, 170, 0.72); */
background-color: #D8EFF2 ;
}
#finc-tb2.table-striped>tbody>tr:nth-of-type(even){
/* background-color:rgba(160, 222, 170, 0.72); */
background-color: #fbfbfb ;
}
#finc-tb.table-striped>tbody>tr{
border: 1px;
border-collapse: separate !important;
border-style: double !important;
border-spacing: 2px !important;
border-color: grey !important;
}
.finc-table-responsive {
max-height:350px !important;
min-height: 50px !important;
overflow-y: auto;
overflow-x: hidden !important;
}
.finc-table-md {
max-height: 80px !important;
min-height: 50px !important;
overflow-y: auto;
overflow-x: hidden !important;
}
.finc-tb-total{
font-size: 14px;
font-weight: bold;
}
.finc-td-debito{
background-color: rgba(173, 78, 78, 0.29) !important;
}
.finc-td-pendente {
background-color: #dedede !important;
}
.finc-td-estorno {
background-color: #fff79d !important;
}
.finc-bd-l{
border-left: 1px solid #BBB;
}
.finc-i-col-b{
color: #007bff;
}
.finc-sub-bts{
font-size: 12px;
margin-top: 5px;
}
.finc-inpt{
font-size: 12px;
padding: 4 6 4 6 !important;
}
.finc-bd-tb{
border: 1px solid #BBB;
}
.ft-12{
font-size: 12px;
}
.tr-financ:hover{
background-color: #fff;
}
.table-hover-fic tbody tr:hover {
background-color: rgba(232,0,0,.075);
color: #c70f0f;
cursor: pointer;
}
.table-hover-fic-Selected {
background-color: rgba(0, 0, 200, 0.59) !important;
color: #FFF !important;
cursor: pointer;
}
.tt-pg-corp{
background: #396A93;
font-family: helvetica;
font-size: 12px;
font-weight: bold;
color: white;
height: 30px;
border-bottom: 1px solid #BBB;
}
.tt-pg-name{
/* float: left; */
padding: 7px 0 5px 10px;
margin-bottom: 1px;
}
.has-danger-red{
color: #d9534f !important;
}
.processando{
top: 0;
position: relative;
float: left;
left: 0;
width: 100%;
z-index: 9999;
height: 100%;
background-color: rgba(6, 6, 6, 0.38);
}
.processando-i{
margin-top: 10%;
}
.finc-ccc-processando{
top: 156px;
/* top: 166px; */
position: absolute;
float: left;
left: 0;
width: 100%;
/* height: 45%; */
/* height: 400; */
height: 270px;
}
.tbl-Min>table>tbody>tr>td>a,.tbl-Min>table>tbody>tr>td,.tbl-Min>table>tbody>tr{
padding: 0px !important;
}
.cP:hover{
cursor: pointer;
}
/*----------------------------------------------------------
* CLASS MODAL
-----------------------------------------------------------*/
.md-Full{
max-width: 90% !important;
}
.md-lgA{
max-width: 80% !important;
}
.tt-md-corp{
background: #396A93;
/* font-family: helvetica; */
font-size: 16px;
font-weight: bold;
color: white;
/* height: 30px; */
/* border-bottom: 1px solid #BBB; */
padding-top: 0px !important;
padding-left: 15px !important;
padding-bottom: 0px !important;
padding-right: 0px !important;
}
.tt-md-name{
/* float: left; */
padding: 7px 0 5px 10px;
}
.tt-md-close{
padding-right: 15px;
}
.tt-md-corp2{
/* background: #396A93; */
/* font-family: helvetica; */
font-size: 16px;
font-weight: bold;
color: white;
/* height: 30px; */
/* border-bottom: 1px solid #BBB; */
padding-top: 0px !important;
padding-left: 15px !important;
padding-bottom: 0px !important;
padding-right: 0px !important;
}
.tab-cadeiras,.tab-cadeiras li {
background-color: #919ca5f5 !important;
border-radius: 5px 5px 0px 0px !important;
}
.tab-cadeiras li:hover{
background-color: #376992f5 !important;
color: #c91d1d !important;
}
.tab-cadeiras li:hover >a>span{
color: #ee2222 !important;
}
.tab-cadeiras li>a{
color: #292b2c !important;
}
.divcol7{
width: 14.2857px;
-webkit-box-flex: 0;
-ms-flex: 0 0 14.2857%;
flex: 0 0 14.2857%;
max-width: 14.2857%;
padding-right: 15px;
padding-left: 15px;
position: relative;
width: 100%;
min-height: 1px;
text-align: center;
}
.modal-lgA{
width: 90%;
}
.modal-lgB{
width: 80%;
}
.modal-lgC{
width: 70%;
}
.acordionCCP>div>div.card-header {
display: none !important;
visibility: hidden !important;
padding: 0 !important;
}
.acordionCCP>div.card {
background-color: rgba(255, 0, 0, 0);
}
/*
accordion>accordion-group>div>div .card-header {
display: none;
visibility: hidden !important;
padding: 0 !important;
}
accordion>accordion-group> .card-header {
display: none;
visibility: hidden !important;
padding: 0 !important;
}
accordion>accordion-group>div>div {
display: none;
visibility: hidden !important;
padding: 0 !important;
}
accordion>accordion-group>div>div .card-header {
padding: 0 !important;
}*/
.ptop15{
padding-top: 15px;
}
.pdl-0{
padding-left: 0px;
}
.mgt-5{
margin-top: 5px;
}
.mgt-10{
margin-top: 10px;
}
.mgt-15{
margin-top: 15px;
}
.mgb-0{
margin-bottom: 0px;
}
.mgb-5{
margin-bottom: 5px;
}
.mgb-10{
margin-bottom: 10px;
}
.mgr-15{
margin-right: 15px;
}
.table-Debito-td{
color: red;
}
.table-excluir-col-SIM>label::before {
content: "Sim";
}
.table-excluir-col-NAO>label::before {
content: "Não";
}
.table-hover-fic-excluir {
background-color: rgba(214, 34, 11, 0.459) !important;
color: #FFF !important;
cursor: pointer;
}
.table-hover-fic-nova {
background-color: rgba(11, 14, 214, 0.459) !important;
color: #FFF !important;
cursor: pointer;
}
.table-hover-fic-alterado {
background-color: rgba(214, 167, 11, 0.459) !important;
color: #333 !important;
cursor: pointer;
}
.obrigat{
color: red !important;
}
.showNumCart>label::before{
content: " : ";
}
.showNumCart>label{
font-weight: bold;
}
.ft-10{
font-size: 10px !important;
}
.clr-red{
color: red;
}
.bgColW{
background-color: white;
}
ng-select, ng-select > div, .form-group > select, .form-group > input, .selectiongroup > input, .btn {
height: 36px;
}
body {
background-color: #e4e5e6;
overflow-x: hidden;
}
/* estilo para abas */
.tabs > span {
cursor: pointer;
color: #CCCCCC;
margin-left: 20px;
padding-bottom: 1px;
border-bottom: 2px solid;
/*transition: font-size 0.8s linear;*/
-webkit-transition: font-size 0.2s;
-moz-transition: font-size 0.2s;
-o-transition: font-size 0.2s;
transition: font-size 0.2s;
}
.tabs > span:hover {
font-size: 1.2rem;
}
.tabs > span.active {
color: #396a93;
font-size: 1.2rem;
}
.tooltip-relatorio .tooltip-inner {
border: 1px solid #ddd;
background-color: steelblue;
color : white;
font-weight: bold;
}
.container-full {
padding-left: 15px;
padding-right: 15px;
}
.panel-collapsable .card {
border: none!important;
}
.panel-collapsable .card .card-body {
padding: 16px 24px!important;
}
.table-pd-td td {
padding: 5px 0.75rem!important;
}
.table-pd-td thead th {
padding-top: 5px;
padding-bottom: 5px;
}