我收到此错误ERROR in multi
并试图重新安装提到的内容,降级,替换备份,但我一直都会收到此错误。
当我运行ng serve
时会发生这种情况,但它始终会失败。
有人可以帮我解决这个问题吗?
好像它从node_modules
文件夹调用jquery,并在那里失败了?
另外,这个错误意味着什么?
@ multi
./~/bootstrap/dist/css/bootstrap.min.css
./~/flag-icon-css/css/flag-icon.min.css
./~/ti-icons/css/themify-icons.css
./~/simple-line-icons/css/simple-line-icons.css
./~/famfamfam-flags/dist/sprite/famfamfam-flags.min.css ./src/assets/icon/icofont/css/icofont.css
./src/assets/icon/font-awesome/css/font-awesome.min.css ./~/sweetalert2/dist/sweetalert2.min.css
./~/ng2-toasty/style-bootstrap.css .
/~/ng2-toasty/style-default.css ./~/ng2-toasty/style-material.css ./~/froala-editor/css/froala_editor.pkgd.min.css
./~/froala-editor/css/froala_style.min.css
./src/assets/css/animate.css ./src/styles.css
./src/assets/css/custom.css
如果需要我的package.json
{
"name": "mafiagame",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.1.3",
"@angular/cdk": "^2.0.0-beta.8",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.3.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/material": "^2.0.0-beta.8",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/platform-server": "^4.3.0",
"@angular/router": "^4.0.0",
"angular2-moment": "^1.6.0",
"angular2-ui-switch": "^1.2.0",
"bcrypt-nodejs": "0.0.3",
"bootstrap": "^3.3.7",
"connect-mongo": "^1.3.2",
"cookie-parser": "^1.4.3",
"core-js": "^2.4.1",
"express-session": "^1.15.3",
"mongoose": "^4.10.5",
"ng-sidebar": "^5.1.0",
"ng2-filter-pipe": "^0.1.10",
"ngx-bootstrap": "^1.7.1",
"ngx-facebook": "^2.4.0",
"nodemailer": "^4.0.1",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"passport-local-mongoose": "^4.0.0",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.0.3",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
angular-cli.json:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "mash-able"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"../node_modules/flag-icon-css/css/flag-icon.min.css",
"../node_modules/ti-icons/css/themify-icons.css",
"../node_modules/simple-line-icons/css/simple-line-icons.css",
"../node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.min.css",
"assets/icon/icofont/css/icofont.css",
"assets/icon/font-awesome/css/font-awesome.min.css",
"../node_modules/sweetalert2/dist/sweetalert2.min.css",
"../node_modules/ng2-toasty/style-bootstrap.css",
"../node_modules/ng2-toasty/style-default.css",
"../node_modules/ng2-toasty/style-material.css",
"../node_modules/froala-editor/css/froala_editor.pkgd.min.css",
"../node_modules/froala-editor/css/froala_style.min.css",
"assets/css/animate.css",
"styles.css",
"assets/css/custom.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/froala-editor/js/froala_editor.pkgd.min.js",
"../node_modules/raphael/raphael.js",
"../node_modules/morris.js/morris.js",
"../node_modules/jquery-sparkline/jquery.sparkline.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
答案 0 :(得分:2)
您是否尝试按照以下常规style.css
导入css文件:
@import "../node_modules/bootstrap/dist/css/bootstrap.min.css"
@import "../node_modules/flag-icon-css/css/flag-icon.min.css"
@import "../node_modules/ti-icons/css/themify-icons.css"
@import "../node_modules/simple-line-icons/css/simple-line-icons.css"
@import "../node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.min.css"
@import "../node_modules/sweetalert2/dist/sweetalert2.min.css"
@import "../node_modules/ng2-toasty/style-bootstrap.css"
@import "../node_modules/ng2-toasty/style-default.css"
@import "../node_modules/ng2-toasty/style-material.css"
@import "../node_modules/froala-editor/css/froala_editor.pkgd.min.css"
@import "../node_modules/froala-editor/css/froala_style.min.css"
@import "./assets/icon/icofont/css/icofont.css"
@import "./assets/icon/font-awesome/css/font-awesome.min.css"
@import "./assets/css/animate.css"
@import "./assets/css/custom.css"
将其从angular-cli.json
删除。
答案 1 :(得分:1)
请按照以下步骤操作:
node_modules
。package-lock.json
或yarn.lock
。yarn
,请安装npm install -g yarn
,并通过运行命令ng set --global packageManager=yarn
将其设置为angular cli的默认包管理器。node_modules
命令安装yarn install
。yarn start