[Bug]: tsParticles 1.35.1 "TypeError: Cannot read property 'prototype' of undefined"
See original GitHub issueContact Details
milo.thurston@oerc.ox.ac.uk
What happened?
When running tests for a Vue.js project tsparticles 1.3.5 causes them all to fail. Here’s an example run: https://github.com/FAIRsharing/fairsharing.github.io/pull/1236/checks?check_run_id=3718631748
It can be seen that version 1.3.5 is installed:
> tsparticles@1.35.1 install /home/runner/work/fairsharing.github.io/fairsharing.github.io/node_modules/particles.vue/node_modules/tsparticles
> node ./scripts/install.js
Using an earlier version (1.26.3) avoids this, but Github insists upon installing 1.3.5 every time despite what the package.json file says:
https://github.com/FAIRsharing/fairsharing.github.io/blob/broken_homepage_links/package.json#L37
Version
1.3.5
Which library are you using?
Vue.js 2.x (particles.vue)
tsParticles Configuration
background: {
color: {
value: 'transparent'
}
},
fpsLimit: 60,
particles: {
color: {
value: '#1F8EBF'
},
links: {
color: '#1F8EBF',
distance: 100,
enable: true,
opacity: 0.5,
width: 2
},
collisions: {
enable: true
},
move: {
direction: 'none',
enable: true,
outMode: 'bounce',
random: false,
speed: 1,
straight: false
},
number: {
density: {
enable: true,
value_area: 300
},
value: 50
},
opacity: {
value: 0.5
},
shape: {
type: null
},
size: {
random: true,
value: 5
}
},
detectRetina: true
}
}
What browsers are you seeing the problem on?
No response
Relevant log output
FAIL tests/unit/components/Clients/RESTClient.spec.js
● RESTClient › can process network errors
TypeError: Cannot read property 'prototype' of undefined
at node_modules/tsparticles/Plugins/PolygonMask/pathseg.js:974:31
at Object.<anonymous> (node_modules/tsparticles/Plugins/PolygonMask/pathseg.js:1532:3)
at node_modules/tsparticles/Plugins/PolygonMask/plugin.js:53:61
at loadPolygonMaskPlugin (node_modules/tsparticles/Plugins/PolygonMask/plugin.js:53:13)
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
[TypeError: Cannot read property 'prototype' of undefined] #114
The 'prototype' of undefined error comes from Frisby trying to extend the global Jasmine Object with custom matchers. In Jasmine 2, custom ...
Read more >"Uncaught TypeError: Cannot read property 'prototype' of ...
But when I run the browser side, I get ' Uncaught TypeError: Cannot read property 'prototype' of undefined' error in bundle.js.
Read more >Typeerror: Cannot Read Property 'Prototype' Of Undefined
My issue is regardless of the underlying cause that these false positives make it Uncaught TypeError: Cannot read property 'prototype' of undefined This...
Read more >tsparticles - UNPKG
defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,r,i,o,a,s={} ...
Read more >Karma - TypeError: Cannot read property 'on' of undefined ...
At the same time, your error handler does not take effect. You need to register error handlers before their potential application, i.e.: gulp.task('unit-test', ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes I’ve added a try/catch with a warning on the catch block, so it’s not blocking. Now I can inspect deeply the issue without worrying about time, at least is not blocking anyone server side.
Thanks. Testing it locally (still waiting for the Github build) I now see warnings instead of a failure:
The tests pass, though.
Edit: Passing on Github too, but with warnings: https://github.com/FAIRsharing/fairsharing.github.io/pull/1236/checks?check_run_id=3722280863