Error: "request.includes is not a function"
See original GitHub issueI’m getting the following error when attempting to use this plugin:
C:\Root\Apps\@V\DebateMap\Main\node_modules\svg-sprite-loader\lib\utils.js:168
if (request && (!request.includes(spriteLoaderPath) || !rule)) {
^
TypeError: request.includes is not a function
at isModuleShouldBeExtracted (C:\Root\Apps\@V\DebateMap\Main\node_modules\svg-sprite-loader\lib\utils.js:168:28)
at Array.filter (native)
at Object.aggregate (C:\Root\Apps\@V\DebateMap\Main\node_modules\svg-sprite-loader\lib\utils.js:286:30)
at Compilation.replacePlaceholdersInModules (C:\Root\Apps\@V\DebateMap\Main\node_modules\svg-sprite-loader\lib\plugin.js:35:27)
at Compilation.applyPlugins1 (C:\Root\Apps\@V\DebateMap\Main\node_modules\webpack\node_modules\tapable\lib\Tapable.js:75:14)
at Compilation.seal (C:\Root\Apps\@V\DebateMap\Main\node_modules\webpack\lib\Compilation.js:573:8)
at C:\Root\Apps\@V\DebateMap\Main\node_modules\webpack\lib\Compiler.js:488:16
at C:\Root\Apps\@V\DebateMap\Main\node_modules\webpack\node_modules\tapable\lib\Tapable.js:225:11
at _addModuleChain (C:\Root\Apps\@V\DebateMap\Main\node_modules\webpack\lib\Compilation.js:477:11)
at processModuleDependencies.err (C:\Root\Apps\@V\DebateMap\Main\node_modules\webpack\lib\Compilation.js:448:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[nodemon] app crashed - waiting for file changes before starting...
Here is my config: (well, the relevant part, as it is quite large)
const SpriteLoaderPlugin = require("svg-sprite-loader/plugin");
webpackConfig.plugins.push(
new SpriteLoaderPlugin()
);
webpackConfig.module.rules.push({
test: /\.svg$/,
use: [
"svg-sprite-loader",
"svgo-loader",
]
});
I’m using:
- Webpack: 2.4.1
- svg-sprite-loader: 2.0.5
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (12 by maintainers)
Top Results From Across the Web
Using .includes method in a function - javascript - Stack Overflow
So what the error is trying to tell you is that the value for variable value , e.g. an integer or object, does...
Read more >TypeError: includes is not a function in JavaScript | bobbyhadz
The "includes is not a function" error occurs when the includes() method is called on a value that is not of type string...
Read more >How to solve includes is not a function in JavaScript - Reactgo
The “includes is not a function” error occurs when we call a includes() method on a value other than the strings or arrays....
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
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
Ah, nevermind. Everything seems to be working now. Not sure why it wasn’t before. All is well!
@steplov @Venryx @psachs21 fixed in
svg-sprite-loader@3.0.2
, please check