maria
maria

Reputation: 159

angular error in multi-script loader

I get this error ERROR in multi and have tried to reinstall whats mentioned, degrade, replace with an backup, but i get this error all the time.

This happends when i run ng serve , but it always fails cause of this.

Could anyone help me to get this fixed?

Seems like its calling jquery from node_modules folder, and fails there?

Plus, what does acually this error means ?

      @ 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

if needed my 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": {}
  }
}

Upvotes: 3

Views: 1102

Answers (2)

Arjun Panicker
Arjun Panicker

Reputation: 740

Follow these steps:

  1. Remove node_modules.
  2. Remove package-lock.json or yarn.lock.
  3. Install yarn if you don't have it by running the command npm install -g yarn and set it as the default package manager for angular cli by running the command ng set --global packageManager=yarn.
  4. Install node_modules using the command yarn install.
  5. Check the app by running it using yarn start.

Upvotes: 1

Antoine Clavijo
Antoine Clavijo

Reputation: 1305

Did you try to import your css files in the general style.css like this:

@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"

And remove them from angular-cli.json.

Upvotes: 3

Related Questions