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.

Cannot read property 'android' of undefined

See original GitHub issue

Version

3.7.0

Environment info

mac

Steps to reproduce

['@vue/app', {
  polyfills: [
    // all polyfills list -> https://github.com/zloirock/core-js
    'es6.object.assign',
    'es6.array.find',
    'es6.array.iterator',
    'es6.function.name',
    'es7.object.values',
    'web.dom.iterable'
  ]

It seem caused by’web.dom.iterable’

What is expected?

build is running

What is actually happening?

Cannot read property ‘android’ of undefined

['@vue/app', {
  polyfills: [
    // all polyfills list -> https://github.com/zloirock/core-js
    'es6.object.assign',
    'es6.array.find',
    'es6.array.iterator',
    'es6.function.name',
    'es7.object.values',
    'web.dom.iterable'
  ]

It seem caused by’web.dom.iterable’

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

34reactions
rs3dcommented, Oct 18, 2019

Updating my babel.config.js fixed this issue for me:

module.exports = {
  presets: [["@vue/cli-plugin-babel/preset", {
    useBuiltIns: "usage",
    polyfills: [
      // module filenames from .\node_modules\core-js\modules\
      'es.promise',  // before "es6.promise"
      'es.symbol',  // before "es6.symbol"
    ],
  }]]
}

7reactions
johndabcommented, May 28, 2019

Hi, encountered the same issue with any polyfill starting with es.* or web.* looks like @vue\babel-preset-app\index.js (v3.8) is getting a list of polyfills from

const builtInsList = require('@babel/preset-env/data/built-ins.json')

(I have @babel/preset-env@7.3.4) then includes contains "web.dom.iterable" which is not in builtInsList

  return includes.filter(item => {
    return isPluginRequired(builtInTargets, builtInsList[item])
  })

builtInsList[item] is undefined which later throws an exception. So it looks like only keys from this file will work

I can see that it has changed in the recent version of vue-cli and babel-env.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'getFragmentManager' of ...
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'getFragmentManager' of undefined. This error is popping when I run my ...
Read more >
[SSL Pinning Plugin] Error - Cannot read property 'apply' for ...
I have tried it on MABS 6.1 and now the issue is different and I am still not able to use android application....
Read more >
error cannot read property 'configurations' of undefined. react ...
For Android, the reason it didn't work for me previously might be related to the fact that I'm using react-native-navigation in my project,...
Read more >
Preview Error: Cannot read property 'params' of undefined
After creating a few pages in an App I began getting the error below. Does anyone know how to fix it? I haven't...
Read more >
Cordova Build android. TypeError: Cannot read property ...
2020-05-01T19:33:00.3047409Z Removing ant.properties update hook 2020-05-01T19:33:00.3071989Z TypeError: Cannot read property 'plugin' of undefined ...
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