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

Cannot read property 'split' of undefined (node debugger) #10939

Closed
ghost opened this issue Jan 21, 2017 · 8 comments
Closed

Cannot read property 'split' of undefined (node debugger) #10939

ghost opened this issue Jan 21, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Jan 21, 2017

  • Version: v6.9.4
  • Platform: Darwin macbook.local 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
  • Subsystem: debugger

Ran into an error when using VSCode and the debugger. Not sure any other information I could provide.

npm run-script start 
> [email protected] start /Users/shiels/Git Repositories/thatsartbaby.ie.server
> per-env
> [email protected] start:development /Users/shiels/Git Repositories/thatsartbaby.ie.server
> concurrently --kill-others "nodemon debug server/index.js" "gulp watch"
[0] [nodemon] 1.11.0
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching: *.*
[0] [nodemon] starting `node debug server/index.js`
[0] debug> 
[0] �
[0] < Debugger listening on [::]:5858
[0] debug> 
[0] �
[0] connecting to 127.0.0.1:5858 ..
[0] .
[0]  ok
[0] �
[0] break in server/index.js:1
[0] (node:43763) There was an internal error in Node's debugger. Please report this bug.
[0] Cannot read property 'split' of undefined
[0] TypeError: Cannot read property 'split' of undefined
[0]     at _debugger.js:1105:27
[0]     at Client._onResponse (_debugger.js:250:5)
[0]     at Protocol.Client.protocol.onResponse (_debugger.js:163:39)
[0]     at Protocol.execute (_debugger.js:121:14)
@addaleax
Copy link
Member

addaleax commented Jan 21, 2017

Does this also occur when you’re in a directory whose path doesn’t contain spaces?

@ghost
Copy link
Author

ghost commented Jan 21, 2017

No, it works as normal.

@bnoordhuis
Copy link
Member

Possibly a dup of #3168 but it's useful to know spaces in the cwd have something to do with it.

@Trott Trott added the v6.x label Jul 16, 2017
@Trott
Copy link
Member

Trott commented Jun 15, 2018

It seems like perhaps this should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.

@Trott Trott closed this as completed Jun 15, 2018
@ksac1
Copy link

ksac1 commented Mar 22, 2019

What is the solution for this issue?

@BridgeAR
Copy link
Member

@ksac1 do you have some further information about what Node.js version you are using and what error occurred?

@ksac1
Copy link

ksac1 commented Mar 28, 2019

I hav enode js version: v10.7.0
I have a token which I have generated using JWT( bearer Auth).
I am trying to split the token for 'Bearer' keyword, for verification.
So, I am using:
const token = req.headers.authorization.split(' ')[1];

I have also tried:
const token = req.headers.authorization.split(' ')[1];

But these two statements give error "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined "

I don't know how to resolve this issue.

@lukzerom
Copy link

lukzerom commented Mar 4, 2020

Hey ! I know it's maybe late for answer. I had the same problem with nodemon.
it turned out that the content of the react code accidentally caused the import of one function from nodemon and this caused a problem:
import {removeAllListeners} from 'nodemon';
Deleting this import has restored the application

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

No branches or pull requests

6 participants