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: namespace.charCodeAt is not a function

See original GitHub issue

Installed pm2@3.0.0 and it came with the lastest @pm2/io@2.1.0. Tried to start a node application and got this error.

TypeError: namespace.charCodeAt is not a function                           
    at selectColor (/opt/nvm/versions/node/v8.11.2/lib/node_modules/pm2/node_modules/debug/src/debug.js:47:46)                                                        
    at createDebug (/opt/nvm/versions/node/v8.11.2/lib/node_modules/pm2/node_modules/debug/src/debug.js:121:17)                                                       
    at ModuleUtils.detectModule (/opt/nvm/versions/node/v8.11.2/lib/node_modules/pm2/node_modules/@pm2/io/build/main/src/utils/module.js:14:25)                       
    at Function._lookForModule (/opt/nvm/versions/node/v8.11.2/lib/node_modules/pm2/node_modules/@pm2/io/build/main/src/utils/module.js:51:20)                        
    at /opt/nvm/versions/node/v8.11.2/lib/node_modules/pm2/node_modules/@pm2/io/build/main/src/utils/module.js:62:32                                                  
    at FSReqWrap.oncomplete (fs.js:135:15)

Manually installed @pm2/io@2.0.3. The error got away and managed to start the node application successfully.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Unitechcommented, Jul 21, 2018

the debug module is wrongly instanciated @wallet77 https://github.com/keymetrics/pm2-io-apm/blob/master/src/utils/module.ts#L5, plz dbl check other debug statement

0reactions
wallet77commented, Jul 23, 2018

It’s fixed on 2.1.1

$ npm install pm2@latest -g
$ pm2 update
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Error as str.charCodeAt is not a function - Stack Overflow
I found the problem in the Msg91 npm package, I created a pull request for the author to merge it. Here is the...
Read more >
mocha/mocha.js - chromium/src/third_party - Git at Google
function from$1 (that, value, encodingOrOffset, length) {. if (typeof value === 'number') {. throw new TypeError('"value" argument must not be a number'). }....
Read more >
Node.js v19.3.0 Documentation
The store is not accessible outside of the callback function. The store is accessible to any asynchronous operations created within the callback. The...
Read more >
www.gfcmsu.edu/dentalclinic/styles/js/modules/form...
aFunction(path[namespace]) || aFunction(global[namespace])\n ... 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n" ...
Read more >
How to solve the "is not a function" error in JavaScript
js we use require() to load external modules and files. This can cause, in some cases, an error like this: TypeError: require(...) is...
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