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.

TypeError: Cannot read property 'Symbol(duplicates)' of undefined

See original GitHub issue

getDuplicates fails with this when i use browserify --no-bundle-external.

  return row[kDuplicates] || []
             ^

TypeError: Cannot read property 'Symbol(duplicates)' of undefined
    at getDuplicates (/home/arch/Code/goto-bus-stop/common-shakeify/index.js:214:14)
    at analyzer.modules.forEach (/home/arch/Code/goto-bus-stop/common-shakeify/index.js:115:21)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
goto-bus-stopcommented, Oct 15, 2017

Ahh I see, so common-shakeify breaks when using -r. there’s nothing wrong with how you’re using it. i’ll try to fix in #11

0reactions
AVVScommented, Feb 6, 2018

Same error on 0.4.5, but my config is quite weird, maybe I should do something better or doing something wrong, but I cant see what it could possibly be

[17:59:56] TypeError: Cannot read property 'Symbol(duplicates)' of undefined
    at getDuplicates (/Users/vitaly/projects/cappasity-player/node_modules/common-shakeify/index.js:222:13)
    at analyzer.modules.forEach (/Users/vitaly/projects/cappasity-player/node_modules/common-shakeify/index.js:121:21)
    at Map.forEach (<anonymous>)
    at DestroyableTransform.onend [as _flush] (/Users/vitaly/projects/cappasity-player/node_modules/common-shakeify/index.js:118:22)
    at DestroyableTransform.<anonymous> (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_transform.js:138:49)
    at Object.onceWrapper (events.js:255:19)
    at DestroyableTransform.emit (events.js:160:13)
    at prefinish (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_writable.js:596:14)
    at finishMaybe (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_writable.js:604:5)
    at endWritable (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_writable.js:615:3)
    at DestroyableTransform.Writable.end (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_writable.js:571:41)
    at Labeled.<anonymous> (/Users/vitaly/projects/cappasity-player/node_modules/stream-splicer/index.js:43:26)
    at Object.onceWrapper (events.js:255:19)
    at Labeled.emit (events.js:165:20)
    at finishMaybe (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_writable.js:607:14)
    at endWritable (/Users/vitaly/projects/cappasity-player/node_modules/readable-stream/lib/_stream_writable.js:615:3)
// external
const external = config.external = [
  'three',
  'three/examples/js/Detector',
  'buffer',
  // 'babel-runtime',
  'pino',
  'is-buffer',
  'axios',
  'eventemitter3',
  'hammerjs',
  'bluebird',
  'progressbar.js',
  'jws',
  'raf',
  'qs/lib/parse',
  'raven-js',
  'raven-js/plugins/vue',
  'platform',
  'webfontloader',
  'vue',
  'vuex',
  'lodash/get',
  'lodash/find',
  'lodash/assign',
  'lodash/forEach',
  'lodash/pick',
  'lodash/mapValues',
  'spark-md5',
];

const options = {
  paths: ['node_modules', 'src'],
  debug: true,
  fullPaths: false,
  cache: {},
  packageCache: {},
  builtins: {
    ...omit(builtins, 'buffer'),
    vm: require.resolve('browserify/lib/_empty'),
  },
  noParse: ['three', 'bluebird'],
  externalRequireName: '_der_',
  require: external.slice(3), /* excludes three.js **, buffer */
  external: external.slice(2, 3), /* buffer */
  plugin: [],
  entries: ['./src/raven.js'],
};

const Vendor = browserify(options);

bundler.transform('envify', {
...
}

bundler.transform('babelify', { global: true });

// uses tinyify under the hood, just remapped uglify options and made some opts
// configurable
bundler.plugin('./vendor/tinyify', {
      uglify: config.uglify,
      shake: true,
      flat: true,
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'symbol' of undefined in 'unknown ...
This issue comes from crash dumps in telemetry. We've tried to de-duplicate issues on a best-effort basis, comparing the sequence of methods ...
Read more >
TypeError: Cannot read property of undefined with web-sockets
Using Isomorphic framework for React and pusher to get websockets. I can't seem to access state when I am in the componentDidMount() function....
Read more >
(cannot read property symbol(symbol.iterator)) - You.com
Uncaught TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) is the error I can't solve [duplicate].
Read more >
Fix: “Cannot Read Property of Undefined” Error in JavaScript
To fix the “cannot read property of undefined” error, use the optional chaining operator on the variable before accessing a property. If the ......
Read more >
Object initializer - JavaScript - MDN Web Docs - Mozilla
In ECMAScript 5 strict mode code, duplicate property names were considered a SyntaxError . With the introduction of computed property names ...
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