question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update to latest NEXT-stable does not work minified

See original GitHub issue

Updating from https://github.com/grommet/grommet.git#173fe04b37980287261aac6e32a1555d8974ad05 to https://github.com/grommet/grommet.git#d2cbb769e2c13cbf9d0b8ac97a5aec0573d4c638 (also tried https://github.com/grommet/grommet.git#7012f96dd1f3dc3a2aff299d15c97d791f6a8ff6) results in minified code stack tracing (but not development mode).

Expected Behavior

New version should work both minified and not.

Actual Behavior

New version does not work minified.

URL, screen shot, or Codepen exhibiting the issue

Hard to reproduce with Codepen, as only happens minified.

Is the code that hits it,

// (C) Copyright 2017-2018 Hewlett Packard Enterprise Development LP

import { hpe } from 'grommet2';
import { deepMerge } from 'grommet2/utils/object';
import { colorForName } from 'grommet2/utils/colors';

export default deepMerge(hpe, {
  global: {
    colors: {
      'border': 'rgba(0, 0, 0, 0.15)',
      'Amazon': '#ff9801',
      'Azure': '#035bdb',
      'dark-4': '#666666',
      'NCS': hpe.global.colors.brand,
    },
    size: {
      'sidebar-wide': '480px',
      'sidebar-narrow': '240px',
    },
    drop: {
      backgroundColor: {
        light: '#ffffff',
        dark: '#222222',
      },
      border: {
        width: '12px',
        radius: '12px',
      },
    },
  },
  button: {
    border: {
      radius: '24px',
    },
  },
  icon: {
    color: colorForName('brand', hpe),
  },
});

and here is the source-mapped stack trace.

Uncaught TypeError: Cannot read property 'global' of undefined
    at Object.<anonymous> (theme.js:14)
    at r (bootstrap:19)
    at Object.<anonymous> (index.js:10)
    at r (bootstrap:19)
    at Object.<anonymous> (index.js:4)
    at r (bootstrap:19)
    at Object.<anonymous> (index.js:9)
    at r (bootstrap:19)
    at Object.<anonymous> (index.js:85)
    at r (bootstrap:19)

Steps to Reproduce

Your Environment

  • Grommet version:
  • Browser Name and version: All
  • Operating System and version (desktop or mobile):

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
florianbepunktcommented, Oct 26, 2018

@alansouzati Narrowed it down a bit further… the problem is introduced with the change from grommet 2.0.0-beta.6 to release candidate. tried to look further, but could not find a changelog for grommet 2

EDIT: Found the changelog under releases… and saw that hpe theme was removed from core and has to be installed as a seperate package. Sorry abut the fuzz.

0reactions
alansouzaticommented, Oct 29, 2018

Yeah import { hpe } from "grommet/themes"; has been removed.

It is now a separate package.

import { hpe } from "grommet/grommet-theme-hpe";

Read more comments on GitHub >

github_iconTop Results From Across the Web

Minify does not update min.js after editing .js - WordPress.org
Now when I purge cache, the min.js file is not updated. ... of the page by pressing Ctrl+F5 to ensure their browser is...
Read more >
Why isn't Auto Minify working? – Cloudflare Help Center
Once enabled, Cloudflare's Auto Minify will minify your HTML and your cached CSS and JS files. If you view the source of your...
Read more >
Minified JS causes JS to not work - Stack Overflow
I'm not sure exactly what doesn't work, there are no errors, just certain features that don't work. Is there any particular reason why...
Read more >
Minification does not respect minified asset keyword - Drupal
Drupal 10, the latest version of the open-source digital experience platform with even more features, is here. Upgrade to Drupal 10. Download & ......
Read more >
Upgrade Guide - Next.js
To update to Next.js version 13, run the following command using your ... However, upgrading to Next.js 13 does not require using the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found