I'm trying to configure npm and gulp to work on a website. When I run gulp, I get these warnings:
% gulp
[14:33:03] Requiring external module babel-register
[14:33:06] Using gulpfile ~/local/mywebsite/wp-content/themes/mywebsitetheme/gulpfile.babel.js
[14:33:06] Starting 'default'...
[14:33:06] Starting 'styles'...
[14:33:06] Starting 'site-js-head'...
[14:33:06] Starting 'site-js-foot'...
[14:33:06] Finished 'default' after 66 ms
assets/js/foot/object-fit-polyfill.js
line 2 col 75 Confusing use of '!'.
line 2 col 134 Missing semicolon.
.
.
.
line 2 col 2673 Missing semicolon.
line 2 col 2675 Expected an assignment or function call and instead saw an expression.
⚠ 25 warnings
[14:33:06] Finished 'site-js-head' after 337 ms
[14:33:09] Finished 'site-js-foot' after 3.13 s
[14:33:09] Finished 'styles' after 3.19 s
%
I've tried npm install objectFitPolyfill to try to get the right code but it doesn't work. Editing this minified .js file seems the wrong way to go. I went to the github of the source for this which is shown in the object-fit-polyfill.js file and tried a copy/paste replacement of the file with the latest, but that doesn't fix it either.
Is there a way to correct things and clear these warnings?