Skip to content
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 'name' of undefined #260

Closed
yoitsro opened this issue Oct 29, 2019 · 7 comments · Fixed by #261
Closed

TypeError: Cannot read property 'name' of undefined #260

yoitsro opened this issue Oct 29, 2019 · 7 comments · Fixed by #261

Comments

@yoitsro
Copy link

yoitsro commented Oct 29, 2019

I'm getting this error when executing my code:

/home/app/node_modules/source-map-support/source-map-support.js:379
return state.nextPosition.name || originalFunctionName();
^
TypeError: Cannot read property 'name' of undefined

It looks like the previous line checks to see if state.nextPosition is null, but does not check if it's undefined.

@6utt3rfly
Copy link
Contributor

I can confirm that I found this issue too I'm rolling back from 0.5.15 to 0.5.13 for now

@yoitsro
Copy link
Author

yoitsro commented Oct 29, 2019

Annoyingly, it's one of my downstream packages which is causing this issue for me. In particular, @google-cloud/trace-agent: https://github.com/googleapis/cloud-trace-nodejs/blob/master/src/util.ts#L265

6utt3rfly added a commit to 6utt3rfly/node-source-map-support that referenced this issue Oct 29, 2019
@rvillane
Copy link

@kjin any chances @google-cloud/trace-agent can pin source-map-support version ?

@kjin
Copy link

kjin commented Oct 29, 2019

You can pin it yourself by adding your own source-map-support dependency on 0.5.13 exactly, npm should de-dupe it: https://gist.github.com/kjin/1b0ec56149f9db708922460f66a94df0

@yoitsro
Copy link
Author

yoitsro commented Oct 29, 2019

@kjin good point! Thanks! For the sake of others running into this problem, would it make sense to pin it directly in your package anyway?

@LinusU
Copy link
Collaborator

LinusU commented Oct 29, 2019

Was out traveling today so got to this late, fixing this now 🐎

LinusU added a commit that referenced this issue Oct 29, 2019
@LinusU
Copy link
Collaborator

LinusU commented Oct 29, 2019

Published as 0.5.16 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants