_input.charCodeAt is not a function
See original GitHub issueWhen the website attempts to load the inspector shows the following error: Uncaught TypeError: this._input.charCodeAt is not a function
Here is my webpack config loader statement:
{test: /\.pug$/, loader: 'pug-loader'},
I am new to webpack, so it may very well be me. I was able to get pug-html-loader working, but would rather stick with the folks that created pug. If it is of any importance, I am using this in an Angular2 app.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
TypeError: str.charCodeAt is not a function - Stack Overflow
I updated to node version 6 today and that might've broke something. I tried to get back to node 5.10 but the issue...
Read more >TypeError: this.input.charCodeAt is not a function · Issue #3089
Exception has occurred: TypeError TypeError: this.input.charCodeAt is not a function at Parser.
Read more >charcodeat is not a function javascript, typeerror
The charCodeAt() method returns the Unicode of the character at the specified index in a string. The index of the first character is...
Read more >String.prototype.charCodeAt() - JavaScript - MDN Web Docs
If index is not a number, it defaults to 0 . Return value. A number representing the UTF-16 code unit value of the...
Read more >t.charcodeat is not a function - You.com | The AI Search ...
This could be an issue with some module not being entirely compatible with newer versions of node.js or could just be a bug...
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 Free
Top 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
Unlike pug-html-loader, the
require('file.pug')
method does not return a string of the html.It returns a template function (as indicated, maybe not clearly enough, in the README). This function takes a “locals” object as parameter, so you can pass it variables that are handled in the pug template. Since Angular2 components already handle these variables, you don’t have to pass any object, but you still have to call the template function to get the html string, hence the
require('file.pug')()
syntax.To have consistency with other loaders, I think it would be great to have an option the loader query to get the string directly instead of the template function.
You have to use this syntax: