Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while using requireJS v2.3.6 #1976

Open
7 tasks
metalist1492 opened this issue Aug 28, 2022 · 1 comment
Open
7 tasks

Error while using requireJS v2.3.6 #1976

metalist1492 opened this issue Aug 28, 2022 · 1 comment

Comments

@metalist1492
Copy link

metalist1492 commented Aug 28, 2022

Issue details

Please provide issue details here.
Error occurs when including requireJS browser-sync-client.js?v=2.27.10:11 Uncaught TypeError: F is not a func

Steps to reproduce/test case

Please provide necessary steps for reproduction of this issue, or better the
reduced test case (without any external dependencies)
.

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ ^2.27.9 ]
  • Node [ v16.17.0 ]
  • Npm [ 8.15.0 ]

Affected platforms

  • [Uuntu 20.04 LTS ] linux
  • [widnows 10] windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • [4.0.2 ] Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

{
  "name": "start-gulp",
  "version": "1.0.0",
  "main": "index.js",
  "author": "Vladyslav Lukianov",
  "license": "MIT",
  "dependencies": {},
  "devDependencies": {
    "browser-sync": "^2.27.9",
    "del": "^6.0.0",
    "gulp": "^4.0.2",
    "gulp-autoprefixer": "^8.0.0",
    "gulp-clean-css": "^4.3.0",
    "gulp-concat": "^2.6.1",
    "gulp-imagemin": "7.1",
    "gulp-less": "^5.0.0",
    "gulp-rename": "^2.0.0",
    "gulp-uglify": "^3.0.2",
    "jquery": "^3.6.0"
  }
}
const { src, dest, watch, parallel, series } = require('gulp');
const less = require('gulp-less');
const cleanCSS = require('gulp-clean-css');
const concat = require('gulp-concat');
const autoprefixer = require('gulp-autoprefixer');
const uglify = require('gulp-uglify');
const imagemin = require('gulp-imagemin');
const del = require('del');
const browserSync = require('browser-sync').create();

function browsersync() {
    browserSync.init({
        server: {
            baseDir: 'app/'
        }
    })
}

function styles() {
    return src('app/less/style.less')
        .pipe(less())
        .pipe(cleanCSS())
        .pipe(concat('style.min.css'))
        .pipe(autoprefixer({
            overrideBrowserslist: ['last 10 versions'],
            grid: true
        }))
        .pipe(dest('app/css'))
        .pipe(browserSync.stream())
};

function scripts() {
    return src([
        'node_modules/jquery/dist/jquery.js',
        'app/js/main.js'
    ])
        .pipe(concat('main.min.js'))
        .pipe(uglify())
        .pipe(dest('app/js'))
        .pipe(browserSync.stream())
}

function images() {
    return src('app/images/**/*.*')
        .pipe(imagemin([
            imagemin.gifsicle({ interlaced: true }),
            imagemin.mozjpeg({ quality: 75, progressive: true }),
            imagemin.optipng({ optimizationLevel: 5 }),
            imagemin.svgo({
                plugins: [
                    { removeViewBox: true },
                    { cleanupIDs: false }
                ]
            })
        ]))
        .pipe(dest('dist/images'))
}

function build() {
    return src([
        'app/**/*.html',
        'app/css/style.min.css',
        'app/fonts/**',
        'app/js/main.min.js'
    ], { base: 'app' })
        .pipe(dest('dist'))
}

function cleanDist() {
    return del('dist')
}

function watching() {
    watch(['app/less/**/*.less'], styles);
    watch(['app/js/**/*.js', '!app/js/main.min.js'], scripts);
    watch(['app/**/*.html']).on('change', browserSync.reload);
};

exports.styles = styles;
exports.scripts = scripts;
exports.browsersync = browsersync;
exports.watching = watching;
exports.images = images;
exports.cleanDist = cleanDist;
exports.build = series(cleanDist, images, build);

exports.default = parallel(styles, scripts, browsersync, watching);
@salminio
Copy link

salminio commented Nov 4, 2022

We are experiencing the same thing. If it helps here is a stack trace (obfuscated but still somewhat legible)
image

      , pm = {
        foreground: "#d3c0c8",
        background: "#2d2d2d",
        black: "#2d2d2d",
        red: "#f2777a",
        green: "#99cc99",
        yellow: "#ffcc66",
        blue: "#6699cc",
        magenta: "#cc99cc",
        cyan: "#66cccc",
        white: "#d3d0c8",
        brightBlack: "#747369"
    }
      , Ts = function() {
        function r(t, e) {
            this.name = t,
            this.opts = e,
            this._name = t || "",
            this._colors = F(F({}, pm), e.colors || {});
            try {
                this.logLevel = window.localStorage.getItem("logLevel") || "info"
            } catch (n) {
                this.logLevel = "info"
            }
            this._logLevel = ks[this.logLevel]
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants