在构建带有角度的项目时遇到问题。 要构建,我使用:
npm install
要运行,我使用:
npm install
我遇到错误:
ERROR in ./node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 Module build failed: Validation Error
URL Loader Invalid Options
options['name'] should NOT have additional properties options.limit should be number
@ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/font-awesome/css/font-awesome.min.css 6:412-465 @ ./node_modules/font-awesome/css/font-awesome.min.css @ multi (webpack)-dev-server/client?http://localhost:4200 ./node_modules/bootstrap/dist/css/bootstrap.min.css ./node_modules/font-awesome/css/font-awesome.min.css ./node_modules/quill/dist/quill.snow.css ./src/styles.scss
ERROR in ./node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0 Module build failed: Validation Error
URL Loader Invalid Options
options['name'] should NOT have additional properties options.limit should be number
@ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/font-awesome/css/font-awesome.min.css 6:495-547 @ ./node_modules/font-awesome/css/font-awesome.min.css @ multi (webpack)-dev-server/client?http://localhost:4200 ./node_modules/bootstrap/dist/css/bootstrap.min.css ./node_modules/font-awesome/css/font-awesome.min.css ./node_modules/quill/dist/quill.snow.css ./src/styles.scss
ERROR in ./node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0 Module build failed: Validation Error
URL Loader Invalid Options
options['name'] should NOT have additional properties options.limit should be number
@ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/font-awesome/css/font-awesome.min.css 6:576-627 @ ./node_modules/font-awesome/css/font-awesome.min.css @ multi (webpack)-dev-server/client?http://localhost:4200 ./node_modules/bootstrap/dist/css/bootstrap.min.css ./node_modules/font-awesome/css/font-awesome.min.css ./node_modules/quill/dist/quill.snow.css ./src/styles.scss
我尝试在Windows 10和Ubuntu 18.04上对此进行设置。
npm -v
6.4.1
node -v
v10.14.2
依赖关系存储在package.json中:
"dependencies": {
"@angular/animations": "4.2.4",
"@angular/common": "4.2.4",
"@angular/compiler": "4.2.4",
"@angular/core": "4.2.4",
"@angular/forms": "4.2.4",
"@angular/http": "4.2.4",
"@angular/platform-browser": "4.2.4",
"@angular/platform-browser-dynamic": "4.2.4",
"@angular/router": "4.2.4",
"@types/uuid": "3.4.4",
"blueimp-load-image": "2.18.0",
"bootstrap": "4.0.0-beta.3",
"core-js": "2.4.1",
"exif-js": "2.3.0",
"file-saver": "1.3.3",
"font-awesome": "4.7.0",
"jquery": "3.2.1",
"mydatepicker": "2.6.1",
"ngx-quill": "1.6.0",
"popper.js": "1.12.5",
"rxjs": "5.4.2",
"tether": "1.4.0",
"zone.js": "0.8.14"
},
"devDependencies": {
"@angular/cli": "1.4.5",
"@angular/compiler-cli": "4.2.4",
"@angular/language-service": "4.2.4",
"@types/node": "^6.14.2",
"autoprefixer": "6.5.3",
"circular-dependency-plugin": "3.0.0",
"codelyzer": "~3.2.0",
"copy-webpack-plugin": "4.0.1",
"css-loader": "0.28.1",
"cssnano": "3.10.0",
"exports-loader": "0.6.3",
"file-loader": "0.10.0",
"html-webpack-plugin": "2.29.0",
"istanbul-instrumenter-loader": "2.0.0",
"less-loader": "4.0.5",
"license-webpack-plugin": "1.1.1",
"postcss-loader": "1.3.3",
"postcss-url": "5.1.2",
"protractor": "~5.1.2",
"raw-loader": "0.5.1",
"sass-loader": "6.0.3",
"source-map-loader": "0.2.0",
"style-loader": "0.13.1",
"stylus-loader": "3.0.1",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.3.3",
"url-loader": "0.6.0",
"webpack": "~3.6.0",
"webpack-concat-plugin": "1.4.0",
"webpack-dev-server": "~2.7.1"
}
可能其中一些库未使用,但我不想删除它们。我应该更新其中的一些吗?
答案 0 :(得分:0)
在构建过程中发生错误,但我没有看到它。错误与字体很棒的旧版本有关。