Issue with a lot of svg files
See original GitHub issueHi. I have 240 svg files in different folders and I’m getting the following error:
/opt/gulp/node_modules/async/dist/async.js:844
if (fn === null) throw new Error("Callback was already called.");
^
Error: Callback was already called.
at /opt/gulp/node_modules/async/dist/async.js:844:36
at SVGSprite._cleanSVGO (/opt/gulp/node_modules/svg-sprite-data/lib/svg-sprite.js:150:9)
at /opt/gulp/node_modules/svg-sprite-data/lib/svg-sprite.js:381:18
at nextTask (/opt/gulp/node_modules/async/dist/async.js:5021:18)
at Object.waterfall (/opt/gulp/node_modules/async/dist/async.js:5024:9)
at SVGSprite._processFile (/opt/gulp/node_modules/svg-sprite-data/lib/svg-sprite.js:378:11)
at tasks.(anonymous function) (/opt/gulp/node_modules/svg-sprite-data/lib/svg-sprite.js:203:14)
at /opt/gulp/node_modules/async/dist/async.js:3671:13
at replenish (/opt/gulp/node_modules/async/dist/async.js:884:21)
at /opt/gulp/node_modules/async/dist/async.js:888:13
My gulp task is the following:
gulp.task('sprite', function () {
return gulp.src(path.join(paths.svg, '**', '*.svg'))
.pipe(svgSprite({
mode: 'symbols',
preview: false,
svg: {
symbols: 'symbols.svg'
}})
)
.pipe(gulp.dest(paths.build.svg));
});
If I run the task with less .svg files, it works correctly.
Versions:
"gulp-svg-sprites": "4.0.2",
"gulp": "3.9.1"
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
5 Most Common Problems Faced by SVG Users
1. Missing fonts · 2. Missing SVG namespaces · 3. SVG appears to be blurry or distorted · 4. Large SVG file size...
Read more >Fixing Problem SVG Files - YouTube
Fixing Problem SVG Files. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, try restarting ...
Read more >SVG Files Showing as HTML Documents - YouTube
If your SVG files show up as "HTML Document" or "Chrome HTML Document," never fear! It's an easy fix of the settings in...
Read more >Display issue when two or more SVGs are on a single ...
This problem occurs if the two images share common properties. To fix this issue, open the SVG file in Illustrator and save the...
Read more >Error loading SVG file
Error loading SVG file. This is not a valid SVG file. I had previously gotten this error randomly and would fix by relinking...
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
I created a pull request on svg-sprite-data, which seemed to resolve this issue: https://github.com/shakyShane/svg-sprite-data/pull/5
@soenkekluth thanks a lot 👍