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.

Error: "request.includes is not a function"

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
paul-sachscommented, May 25, 2017

Ah, nevermind. Everything seems to be working now. Not sure why it wasn’t before. All is well!

1reaction
kisenkacommented, May 24, 2017

@steplov @Venryx @psachs21 fixed in svg-sprite-loader@3.0.2, please check

Read more comments on GitHub >

github_iconTop 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 >

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