-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'type' of undefined #1000
Comments
Hello, we had the same problems recently while bundling yfiles. |
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:
|
Facing the same type error issue while bundling the packages using r.js Is there any updates from the requirejs library for this issue ? @Novynn Did you find any work around for this issue ? |
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! |
Came across this problem while trying to optimize a script that requires [email protected]. It looks like this line is the culprit:
r.js/build/jslib/parse.js
Line 939 in 1752638
I've fixed it locally by adding
&& bodyNode.consequent.body.length
to the end of the if statement linked becauseconsequent.body
is an object not an array in this case ({type: 'BlockStatement', body: {...}}
).The text was updated successfully, but these errors were encountered: