Skip to content

Issue with core-js and lodash  #354

@pascalduez

Description

@pascalduez

Bumped in to a pretty edge/pain case while working on the theme generator.
The Gruntfile use BrowserSync and also sassoc to provide live reloading while working on css, js, and templates.

BrowserSync has a deep dependency which relies on [email protected]

Fatal error: boolean is not a function
TypeError: boolean is not a function
    at Function.isPlainObject ([...]/node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/node_modules/lodash/dist/lodash.js:1652:64)

Deps path:

grunt-browser-sync/browser-sync/glob-watcher/gaze/globule/lodash

Reproduce:

var sassdoc = require('sassdoc');
var _ = require('lodash'); // 1.0.1

_.isPlainObject({});  // Boom
var sassdoc = require('sassdoc');
var _ = require('lodash'); // >=3.0.0

_.isPlainObject({});  // \o/

This is coming from our require('core-js/shim') from polyfill.js
It must be overriding or extending a native prototype.

Not sure whether we could or should do something about it, just keeping a record of it here.

Ideally, it would be nice to not depend on core-js at some point, let see.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions