0

I had to rename many files in my Icons folder because they contained a # in their filename and that was a prohibited character on Netifly

In doing so now when I run gulp or gulp build in the project directory I get the following errors:

$ gulp build
[19:40:52] Using gulpfile ~/Desktop/mkt_website/marketing_website/gulpfile.js
[19:40:52] Starting 'build'...
[19:40:52] Starting 'clean:tmp'...
[19:40:52] Starting 'clean:dist'...
[19:40:52] Starting 'copy:all'...
[19:40:52] Starting 'copy:libs'...
[19:40:52] Finished 'clean:tmp' after 11 ms
[19:40:52] Finished 'clean:dist' after 12 ms
[19:40:53] Finished 'copy:libs' after 1.47 s
[19:40:54] Finished 'copy:all' after 2.64 s
[19:40:54] Starting 'scss'...
[19:40:55] Finished 'scss' after 1 s
[19:40:55] Starting 'html'...
[19:40:57] 'html' errored after 2.19 s
[19:40:57] Error in plugin "gulp-file-include"
Message:
    ENOENT: no such file or directory, open '/Users/kareem/Desktop/mkt_website/marketing_website/src/assets/img/icons/duotone-icons/Code/Git#1.svg'
Details:
    domainEmitter: [object Object]
    domainThrown: false

[19:40:57] 'build' errored after 5.84 s

Edit:

If it helps here is a link to my gulpfile.js https://pastebin.com/fEs2DrZp

Kareem
  • 569
  • 2
  • 18

1 Answers1

0

It looks like your npm cache has not updated since the filename changes

NPM Cache

Start by running npm cache verify and see what you get, this may take a while but once done try rerunning gulp. If you still see the error, you could also run npm cache clean --force

Another possible issue

Often ENOENT errors in gulp are caused by some kind of race condition, I suggest updating your build task so it clears first, then copies. At the moment they are running in parallel. So gulp maybe deleting files you want to keep.

Change build task to: gulp.task('build', gulp.series(gulp.parallel('clean:tmp', 'clean:dist'), gulp.parallel('copy:all', 'copy:libs'), 'scss', 'html'));

The second bit is unlikely to be the cause of the issue but could come to haunt you later on.

Also might be worth looking at: ENOENT, no such file or directory

Sam
  • 755
  • 4
  • 15