Node 6 - TypeError: mod.lastIndexOf is not a function
See original GitHub issuenode-dev index.js
/home/alex/.nvm/versions/node/v6.0.0/lib/node_modules/node-dev/lib/index.js:120
var i = mod.lastIndexOf(n);
^
TypeError: mod.lastIndexOf is not a function
at getPrefix (/home/alex/.nvm/versions/node/v6.0.0/lib/node_modules/node-dev/lib/index.js:120:15)
at getLevel (/home/alex/.nvm/versions/node/v6.0.0/lib/node_modules/node-dev/lib/index.js:110:11)
at /home/alex/.nvm/versions/node/v6.0.0/lib/node_modules/node-dev/lib/index.js:77:45
at ChildProcess.handleMessage (/home/alex/.nvm/versions/node/v6.0.0/lib/node_modules/node-dev/lib/ipc.js:19:43)
at emitTwo (events.js:111:20)
at ChildProcess.emit (events.js:191:7)
at handleMessage (internal/child_process.js:718:10)
at Pipe.channel.onread (internal/child_process.js:444:11)
Node 6 OS: Linux
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Uncaught TypeError: .indexOf is not a function - Stack Overflow
It is indeed a function - of a valid object - meaning time isn't a valid object. Make sure time exists, log it...
Read more >TypeError: indexOf is not a function in JavaScript | bobbyhadz
The "indexOf is not a function" error occurs when the indexOf() method is called on a value that is not of type string...
Read more >Node.js v19.3.0 Documentation
calls() and will throw an error for functions that have not been called the expected number of times. import assert from 'node:assert'; //...
Read more >Uncaught TypeError: e.indexOf is not a function - WordPress.org
It gives me this error: Uncaught TypeError: e.indexOf is not a function. And the “I like” does not tell me anything, but it...
Read more >String.prototype.lastIndexOf() - JavaScript - MDN Web Docs
The index of the last occurrence of searchString found, or -1 if not found. Description. Strings are zero-indexed: The index of a string's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks again! Fix published as part of v3.1.1.
function getFileExtension(filename) { return filename.slice((filename.lastIndexOf(“.”) - 1 >>> 0) + 2); }
I’m getting the following errors: (node:21156) UnhandledPromiseRejectionWarning: TypeError: filename.lastIndexOf is not a function at getFileExtension (F:\galaxy\app.js:227:37)