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.

Error on App start - Cannot read property 'prototype' of undefined

See original GitHub issue

Im building next.js` app. And till yesterday everything work fine, but today i updated 2 packages:

aws-amplify to 1.1.1
aws-amplify-react to 2.0.2

And from this moment i cannot start the app, i mean i receive an error in console:

{ TypeError: Cannot read property ‘prototype’ of undefined at Object.<anonymous> (…/…/…/src/vendor/dom-utils/matches.ts:5:32) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (…/…/…/src/vendor/dom-utils/closest.ts:5:0) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) sourceMapsApplied: true }

TypeError: Cannot read property ‘prototype’ of undefined at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/matches.js:6:31) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/closest.js:6:17) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) TypeError: Cannot read property ‘prototype’ of undefined at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/matches.js:6:31) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/closest.js:6:17) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18)

TypeError: Cannot read property ‘prototype’ of undefined at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/matches.js:6:31) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/closest.js:6:17) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18)

TypeError: Cannot read property ‘prototype’ of undefined at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/matches.js:6:31) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/Users/eugenealitz/projects/proposalis-aws/node_modules/@aws-amplify/analytics/lib/vendor/dom-utils/closest.js:6:17) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:713:10) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal/modules/cjs/loader.js:543:3) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18)

Tried to rollback this packages, also removing /node_modules folder at all with no success

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
shurik239commented, Sep 18, 2018

same issue on running gatsby develop downgrading just only @aws-amplify/analytics to 1.0.9 with yarn resolutions directive:

  "resolutions": {
    "@aws-amplify/analytics" : "1.0.9"
  },

solved for me the issue

0reactions
github-actions[bot]commented, Jun 13, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'prototype' of undefined? - Stack Overflow
I fixed this bug. The problem was that I created Collection and then the Model. Collections use user model, as working unit, ...
Read more >
TypeError: Cannot read property 'prototype' of ... - GitHub
I've come across a TypeError of which I can't seem to find the cause though. Does anyone have an idea where I should...
Read more >
Cannot read property 'prototype' of undefined
Hi, how do I resolve konyuiBaseClasses.js:4 Uncaught TypeError: Cannot read property 'prototype' of undefined. The problem is I can't load ...
Read more >
Can someone plz help with this error in a React app. "TypeError
"TypeError: Cannot read property 'prototype' of undefined". Good afternoon reddit, Im buiding a e-commerce web application using MERN stack ...
Read more >
TypeError: Cannot read property 'prototype' of undefined ...
I tried to change my bot from komada to klasa, but this error apears. What is happening? ... Please help me! ... I...
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