You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: Cannot read property 'type' of undefined #1000
I've fixed it locally by adding && bodyNode.consequent.body.length to the end of the if statement linked because consequent.body is an object not an array in this case ({type: 'BlockStatement', body: {...}}).
Reacted by Sebastian Müller, Michael Baur and Senthilkumar
Hello, we had the same problems recently while bundling yfiles.
Would this fix be released in a new version of requirejs from the jquery legacy team?
Regards
Fab
I'm seeing this, too, when we optimize a project where one of the included modules is itself a library that was built using r.js (and minified). I can reproduce the error by replacing that module with just this minimal bit of code:
(function () {
if (typeof define !== 'undefined') for (;;) {
}
})()
I maintain a fork using a modern JavaScript parser and enhanced source map support as @prantlf/requirejs. I merged#1005 fixing this problem. Thank you!
Activity
pinuchfab commentedon Dec 18, 2019
Hello, we had the same problems recently while bundling yfiles.
Would this fix be released in a new version of requirejs from the jquery legacy team?
Regards
Fab
anandthakker commentedon Jul 15, 2020
I'm seeing this, too, when we optimize a project where one of the included modules is itself a library that was built using r.js (and minified). I can reproduce the error by replacing that module with just this minimal bit of code:
senthilkumar04 commentedon Mar 18, 2021
Facing the same type error issue while bundling the packages using r.js
TypeError: Cannot read property 'type' of undefined
Is there any updates from the requirejs library for this issue ?
@Novynn Did you find any work around for this issue ?
prantlf commentedon Apr 23, 2023
I maintain a fork using a modern JavaScript parser and enhanced source map support as @prantlf/requirejs. I merged #1005 fixing this problem. Thank you!