question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: content.replace is not a function

See original GitHub issue

TCT crashes with the error below for when I have any git repos set up

  • Node Version: v10.19.0
  • tiny-core-terminal version: 1.7.4
  • Shell: zsh
  • Terminal Program: Terminal
  • Operating System: macOS Catalina 10.15.4

ENV variables

export TTC_BOTS='tinycarebot,selfcare_bot,magicrealismbot'
export TTC_SAY_BOX='RANDOM'
export TTC_REPOS='/Users/soringuga/projects'
export TTC_REPOS_DEPTH=1
export TTC_WEATHER='redacted'
export TTC_CELSIUS=true
export TTC_APIKEYS=false
export TTC_UPDATE_INTERVAL=20
export TTC_TERMINAL_TITLE=false
export TTC_POMODORO=20
export TTC_BREAK=5
TypeError: content.replace is not a function
    at Box.Element.parseContent (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:364:8)
    at Box.Element.render (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:1839:8)
    at /Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:738:8
    at Array.forEach (<anonymous>)
    at Screen.render (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:735:17)
    at Box.<anonymous> (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:1936:20)
    at Box.EventEmitter._emit (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/events.js:94:20)
    at Box.EventEmitter.emit (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/events.js:117:12)
    at Program.<anonymous> (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:518:16)
    at Program.emit (events.js:198:13)
    at Program._bindMouse (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:703:10)
    at Program.<anonymous> (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:566:10)
    at Program.emit (events.js:198:13)
    at /Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:418:15
    at Array.forEach (<anonymous>)
    at ReadStream.input.on.input._dataHandler (/Users/soringuga/.nvm/versions/node/v10.19.0/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:416:23)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
VFabriciocommented, Apr 27, 2020

I have the same problem. An exception is being thrown by Blessed at Box.Element.parseContent and it is not handled anywhere. Based on a very quick investigation, this seems to happen for me whenever TTC_REPOS is not empty. I will try to follow the stack trace and see if I find the origin of the problem.

0reactions
iraecommented, Apr 30, 2020

I believe some dependency that was not pinned broke, since installing old versions does not fix anything, I can’t make it work with any revision from the past 2 years.

Read more comments on GitHub >

github_iconTop Results From Across the Web

var.replace is not a function - javascript - Stack Overflow
make sure you are passing string to "replace" method. Had same issue and solved it by passing string.
Read more >
Content.replace is not a function (Example) - Treehouse
The "Content.replace is not a function" just means that the "fileContents" argument isn't a string, which could be something that doesn't even ...
Read more >
TypeError: replace is not a function in JavaScript - Java2Blog
TypeError : .replace is not a function occurs when we call replace() function on object which is not an string. replace() function can...
Read more >
str.replace is not a function #134 - request/request-promise
replace is not a function ' with no stack trace and no advice on what to fix. This bug is that the error...
Read more >
TypeError: t.replace is not a function - WordPress.org
We are getting a console error which seems to be related to (not sure if it's ... TypeError: t.replace is not a function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found