twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
170.3k stars 78.79k forks source link

Error: no mixin named -assert-ascending #24900

Closed jenkijo closed 6 years ago

jenkijo commented 6 years ago

Hi. I get a silly error when using bootstrap (npm) with gulp error

I've check npm module, it's fine.

My package.json

{
  "name": "Union",
  "version": "0.0.1-alpha",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git@github.com:anity99/union.git"
  },
  "devDependencies": {
    "@claviska/jquery-ajax-submit": "^2.0.4",
    "@claviska/jquery-alertable": "^1.0.2",
    "@claviska/jquery-animate-css": "^1.0.0",
    "@claviska/jquery-announce": "^1.0.0",
    "@claviska/jquery-offscreen": "^1.0.1",
    "@claviska/jquery-selectable": "^1.0.6",
    "animate.css": "^3.5.2",
    "babel-preset-es2015": "^6.22.0",
    "chalk": "^1.1.3",
    "clipboard": "^1.6.1",
    "del": "^2.2.1",
    "eslint": "^3.10.1",
    "font-awesome": "^4.7.0",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^3.1.0",
    "gulp-babel": "^6.1.2",
    "gulp-browserify": "^0.5.1",
    "gulp-clean-css": "^3.0.3",
    "gulp-eslint": "^3.0.1",
    "gulp-help": "^1.6.1",
    "gulp-imagemin": "^3.0.2",
    "gulp-preprocess": "^2.0.0",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^2.3.2",
    "gulp-uglify": "^1.5.4",
    "gulp-watch": "^4.3.9",
    "jquery": "^3.1.1",
    "js-cookie": "^2.1.3",
    "nprogress": "^0.2.0",
    "path": "^0.12.7",
    "screenfull": "^3.0.2",
    "selectize": "^0.12.4",
    "sortablejs": "^1.5.0",
    "tether": "^1.3.2",
    "tinymce": "^4.5.4",
    "typeahead.js": "^0.11.1"
  },
  "dependencies": {
    "autolinker": "^1.4.2",
    "bcryptjs": "^2.4.3",
    "bluebird": "^3.5.0",
    "body-parser": "^1.15.2",
    "bootstrap": "^4.0.0-beta.2",
    "chalk": "^1.1.3",
    "cheerio": "^0.22.0",
    "compression": "^1.6.2",
    "connect-slashes": "^1.3.1",
    "cookie-parser": "^1.4.3",
    "crypto": "0.0.3",
    "del": "^2.2.1",
    "dotenv": "^4.0.0",
    "dustjs-helpers": "^1.7.3",
    "dustjs-linkedin": "^2.7.5",
    "express": "^4.14.0",
    "extend": "^3.0.0",
    "format-number": "^2.0.1",
    "fs": "0.0.1-security",
    "gm": "^1.23.0",
    "he": "^1.1.1",
    "http-codes": "^1.0.0",
    "jsonwebtoken": "^7.1.9",
    "jszip": "^3.1.3",
    "lunr": "^1.0.0",
    "marked": "^0.3.6",
    "metaphor": "^3.8.2",
    "mime": "^1.3.4",
    "mkdirp": "^0.5.1",
    "moment": "^2.17.1",
    "moment-timezone": "^0.5.11",
    "multer": "^1.2.0",
    "node-sass": "^4.7.2",
    "nodemailer": "^2.7.0",
    "recursive-readdir": "^2.1.1",
    "sanitize-filename": "^1.6.1",
    "sequelize": "^3.31.0",
    "slugify": "^1.1.0",
    "sqlite3": "^3.1.8",
    "striptags": "^2.2.1",
    "tmp": "0.0.31",
    "trim": "0.0.1",
    "truncate-html": "^0.1.2",
    "undo-manager": "^1.0.5",
    "url": "^0.11.0"
  }
}

My gulpfile.js

/* eslint-env es6, node */
'use strict';

const Gulp = require('gulp-help')(require('gulp'));
const Autoprefixer = require('gulp-autoprefixer');
const Babel = require('gulp-babel');
const Browserify = require('gulp-browserify');
const Chalk = require('chalk');
const CleanCSS = require('gulp-clean-css');
const Del = require('del');
const ESLint = require('gulp-eslint');
const Imagemin = require('gulp-imagemin');
const Path = require('path');
const Rename = require('gulp-rename');
const Sass = require('gulp-sass');
const Uglify = require('gulp-uglify');
const Watch = require('gulp-watch');

////////////////////////////////////////////////////////////////////////////////////////////////////
// Config
////////////////////////////////////////////////////////////////////////////////////////////////////

let fonts = {
  base: Path.join(__dirname, 'node_modules/font-awesome/fonts'),
  source: Path.join(__dirname, 'node_modules/font-awesome/fonts/**/*.+(eot|svg|ttf|woff|woff2|otf)'),
  target: Path.join(__dirname, 'assets/fonts')
};

let images = {
  source: Path.join(__dirname, 'source/images/**/*.+(gif|jpg|jpeg|png|svg)'),
  target: Path.join(__dirname, 'assets/images')
};

let scripts = {
  source: Path.join(__dirname, 'source/scripts/**/*.js'),
  target: Path.join(__dirname, 'assets/js')
};

let styles = {
  source: Path.join(__dirname, 'source/styles/**/*.scss'),
  target: Path.join(__dirname, 'assets/css')
};

////////////////////////////////////////////////////////////////////////////////////////////////////
// Build functions
////////////////////////////////////////////////////////////////////////////////////////////////////

// Copies font files to target
function buildFonts(source, target, base) {
  console.log(Chalk.yellow('Building fonts...'));
  return Gulp.src(source, { base: base })
    .pipe(Gulp.dest(target))
    .on('end', () => {
      console.log(Chalk.green('✔︎ Fonts at ' + new Date()));
    });
}

// Optimizes images in source and outputs them in target
function buildImages(source, target) {
  console.log(Chalk.yellow('Building images...'));
  return Gulp.src(source)
    .pipe(Imagemin())
    .pipe(Gulp.dest(target))
    .on('end', () => {
      console.log(Chalk.green('✔︎ Images at ' + new Date()));
    });
}

// Minifies scripts in source and outputs them in target
function buildScripts(source, target) {
  console.log(Chalk.yellow('Building scripts...'));
  return Gulp.src(source)
    .pipe(ESLint())
    .pipe(ESLint.format())
    .pipe(ESLint.failAfterError())
    .on('error', (err) => {
      console.error(Chalk.red(err.message));
    })
    .pipe(Browserify())
    .on('error', (err) => {
      console.error(Chalk.red(err.message));
    })
    .pipe(Babel({
      compact: false,
      presets: ['es2015']
    }))
    .on('error', (err) => {
      console.error(Chalk.red(err.message));
    })
    .on('error', (err) => {
      console.error(Chalk.red(err.message));
    })
    .pipe(Uglify({
      preserveComments: 'license'
    }))
    .on('error', (err) => {
      console.error(Chalk.red(err.message));
    })
    .pipe(Rename({ suffix: '.bundle' }))
    .pipe(Gulp.dest(target))
    .on('end', () => {
      console.log(Chalk.green('✔︎ Scripts at ' + new Date()));
    });
}

// Compiles styles in source and outputs them in target
function buildStyles(source, target) {
  console.log(Chalk.yellow('Building styles...'));
  return Gulp.src(source)
    .pipe(Sass({
      includePaths: [
        'node_modules'
      ],
      precision: 8,
      outputStyle: 'compressed'
    }))
    .on('error', (err) => {
      console.error(Chalk.red(err.message));
    })
    .pipe(Autoprefixer({
      browsers: ['last 2 versions']
    }))
    .pipe(CleanCSS({
      format: 'keep-breaks',
      specialComments: 'all'
    }))
    .pipe(Gulp.dest(target))
    .on('end', () => {
      console.log(Chalk.green('✔︎ Styles at ' + new Date()));
    });
}

////////////////////////////////////////////////////////////////////////////////////////////////////
// Build tasks
////////////////////////////////////////////////////////////////////////////////////////////////////

// Build fonts
Gulp.task('build:fonts', 'Build font assets.', ['clean:fonts'], () => {
  buildFonts(fonts.source, fonts.target, fonts.base);
});

// Build images
Gulp.task('build:images', 'Optimize images.', ['clean:images'], () => {
  buildImages(images.source, images.target);
});

// Build scripts
Gulp.task('build:scripts', 'Build scripts.', ['clean:scripts'], () => {
  buildScripts(scripts.source, scripts.target);
});

// Build styles
Gulp.task('build:styles', 'Build styles.', ['clean:styles'], () => {
  buildStyles(styles.source, styles.target);
});

// Build all
Gulp.task('build', 'Run all build tasks.', [
  'build:fonts',
  'build:images',
  'build:scripts',
  'build:styles'
]);

////////////////////////////////////////////////////////////////////////////////////////////////////
// Clean tasks
////////////////////////////////////////////////////////////////////////////////////////////////////

// Clean fonts
Gulp.task('clean:fonts', 'Delete generated fonts.', () => {
  return Del(fonts.target);
});

// Clean images
Gulp.task('clean:images', 'Delete generated images.', () => {
  return Del(images.target);
});

// Clean scripts
Gulp.task('clean:scripts', 'Delete generated scripts.', () => {
  return Del(scripts.target);
});

// Clean styles
Gulp.task('clean:styles', 'Delete generated styles.', () => {
  return Del(styles.target);
});

// Clean all
Gulp.task('clean', 'Delete all generated files.', [
  'clean:fonts',
  'clean:images',
  'clean:scripts',
  'clean:styles'
]);

////////////////////////////////////////////////////////////////////////////////////////////////////
// Other tasks
////////////////////////////////////////////////////////////////////////////////////////////////////

// Watch for changes
Gulp.task('watch', 'Watch files and automatically build assets on change.', () => {
  // Watch fonts
  Gulp.src(fonts.source)
    .pipe(Watch(fonts.source))
    .on('add', (file) => {
      buildFonts(file, fonts.target);
    })
    .on('change', (file) => {
      buildFonts(file, fonts.target);
    });

  // Watch images
  Gulp.src(images.source)
    .pipe(Watch(images.source))
    .on('add', (file) => {
      buildImages(file, images.target);
    })
    .on('change', (file) => {
      buildImages(file, images.target);
    });

  // Watch scripts
  Gulp.src(scripts.source)
    .pipe(Watch(scripts.source))
    .on('add', (file) => {
      buildScripts(file, scripts.target);
    })
    .on('change', (file) => {
      buildScripts(file, scripts.target);
    });

  // Watch styles
  Gulp.src(styles.source)
    .pipe(Watch(styles.source))
    // Recompile all styles since changes to _partials.scss won't compile on their own
    .on('add', () => {
      buildStyles(styles.source, styles.target);
    })
    .on('change', () => {
      buildStyles(styles.source, styles.target);
    });
});

// Default
Gulp.task('default', 'Run the default task.', ['help']);

I've testet with node 6 7 8. But I still get the error when run gulp build

Johann-S commented 6 years ago

Sorry, but we cannot help with how-to or general troubleshooting issues here; only bug reports and feature requests. You'll want to ask around in the official Slack team or Stack Overflow. See our readme for more details.