-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
babel-plugin-makepot: Cannot read property 'end' of undefined #21466
Comments
Hi @manzoorwanijk, if I understand correctly
and it passes correctly. Can you provide additional information with steps to reproduce? |
Receiving the same error as specified by @manzoorwanijk while I'm trying to build the project using Also, to give more insight on the error, it's pointing to a line of code that contains translations string Any thoughts on how to resolve the same. |
It seems the error comes from this line:
Although it looks like this in var line = commentNode.loc.end.line; I get the same error while trying to build a block that uses
I'm guessing |
can confirm with @wvega above - we are working at the same project replacing the affected lines from 3.5.0 build with: var line = null;
if ( commentNode && commentNode.loc && commentNode.loc.end ) {
line = commentNode.loc.end.line;
} seems to do the trick; the code picks up changes in the translatable strings correctly probably you just need to adapt this sanity check in ES6 in src/index.js |
Any update on this? |
Describe the bug
When creating a build,
babel-plugin-makepot
fails it with this errorThe text was updated successfully, but these errors were encountered: