Using Gulp not generating all files

8 replies · opened Jul 2, 2023

CcarabsJul 2, 2023

I am pretty frustrated... July 4th is my biggest weekend for traffic to my sites.

Last night I downloaded the latest Canvas, ran my gulp to generate all the flat files and distributed them to my sites.

This morning my partner messaged me that our main site is not loading any content ... https://www.exploringnj.com/

The console shows many missing files...
functions.js:1
GET https://www.exploringnj.com/shared/site-themes/t_expnj/dist/can/js/modules/gototop.js net::ERR_ABORTED 404 (Not Found)
functions.js:1
GET https://www.exploringnj.com/shared/site-themes/t_expnj/dist/can/js/modules/bootstrap.js net::ERR_ABORTED 404 (Not Found)
functions.js:1
GET https://www.exploringnj.com/shared/site-themes/t_expnj/dist/can/js/modules/portfolioajax.js 404 (Not Found)
functions.js:1
GET https://www.exploringnj.com/shared/site-themes/t_expnj/dist/can/js/modules/animations.js net::ERR_ABORTED 404 (Not Found)
functions.js:1
GET https://www.exploringnj.com/shared/site-themes/t_expnj/dist/can/js/modules/grid.js net::ERR_ABORTED 404 (Not Found)

I have been working now for over 2 hours and I think I have found the issue... Not all the directories are being copied into the dist via your gulp.

With a quick glance, I am missing modules/ and particles/

https://imgur.com/a/EOjU0ar

And components is missing just about everything...

$ ls -ls dist/js/components
total 4
4 drwxrwxr-x 3 jconklin jconklin 4096 Jul 2 11:41 tinymce
$

Again, running the gulp commands to generate your dist directory is not working properly. And here are my commands...

echo " - Canvas Gulp Start";
gulp scsscompile;
gulp cssminify;
gulp jsminify;

This could be me somehow with my setup, but I do not know how to fix it. What am I missing?! And how can I get an old release quickly?

CcarabsJul 2, 2023

Here is a better screenshot comparison...

https://i.imgur.com/grYuNzL.png

The left if all your files and directories in js/
The right is what gets generated and in dist/js

And I created an unlisted video as well...

https://youtu.be/5nBUkgxK78Y

I am usually VERY careful moving things into production. It seems like my cached files made it seem Ok. But this is kicking our but this weekend!

What can I do?

Do you have a version from before moving the module files?

CcarabsJul 2, 2023

I was able to get a backup of our themes and replace them for now... our production is running without error with this previous version.

Any thoughts on how to address this? Is the issue with gulp not building the complete dist directories an issue on my end? Something your company will fix?

SSemicolon WebSTAFFJul 2, 2023

Hello,

This is a mistake on our part and we really really apologize for the issues.

Please find the following code in your gulpfile.js File:
[ch_pre type="js"]function minifyJS() {
return gulp.src('./js/*.js')
.pipe(uglify())
.pipe(gulp.dest('./dist/js'));
}[/ch_pre]

and replace it with:
[ch_pre type="js"]function minifyJS() {
return gulp.src(['./js/.js', './js/**/.js'])
.pipe(uglify())
.pipe(gulp.dest('./dist/js'));
}[/ch_pre]

We have just check this and it works fine for us. Please try running this on your Servers and let us know if you are facing any further issues. We are right here and assure you that we will fix any issues you might be facing right now so that your sites are not disrupted during the 4th of July rush. Thanks for your super kind patience and we will be more careful in the future.

Let us know if we can help you with anything else.

CcarabsJul 2, 2023

Yeah that fixed it.

That was tough. I am kinda disappointed. This wouldn't be an issue if you did not force us to define jsFolder and cssFolder. I could use what you provide without many of these hoops we have to jump through. But I have to run your gulp and copy that dist directory into my individual site directories. Then I need to run a sed command on the main JS file in each directory to change those paths.

Thank you again... but please, not again. 4+ hours away from my family (should be a few days off). And I do not even know how this changed my traffic.

SSemicolon WebSTAFFJul 2, 2023

Hello,

We really apologize. Only when using Async JS which lazy loads the JS, requires you to define the js/css folders. You can simply use the following:
[ch_pre]
[/ch_pre]

instead of the existing Footer JS Codes and everything will work correctly. We will make these JS codes default in the next version so there won't be any requirements of adding or changing any JS Codes like the js/css folders and everything else work seamlessly.

We really apologize once again as this should not have happened and we will assure you that we will learn from this.

Thanks again for your Kind Patience.

Whenever, in the future you face any issues with Canvas (even the smallest ones), please let us know and we will fix them for you before you have to spend lots of time debugging. We assure you.

CcarabsJul 2, 2023

"You can simply use the following:" - I know in the past you had shared this or something similar as well, but I do not remember why it did not work out for me. I know there was a technical reason, maybe just to keep in sync with your demos? Perhaps to still declare jQuery? I do not remember. Next time we revisit this, I will consider reviewing this ticket.

"Whenever, in the future you face any issues with Canvas (even the smallest ones), please let us know and we will fix them for you before you have to spend lots of time debugging. We assure you." - Thank you for this. I will say that the scripts I use will generate your dist, generate my in-house dist, generate my mapping library, and merge everything for the 8+ sites we have in our network. My first assumption was not Canvas... that is usually spot on. It took me a while to know what it specifically was.

Thank you again.

CcarabsJul 2, 2023

Also, I added my github username on to my profile... jeffconklin

Having a way to pull instead of download may help me out a good bit.

SSemicolon WebSTAFFJul 4, 2023

Hello,

Thanks again so much for your Patience!

We will update the Package to change JS Linkings in all Files and release by the end of this week. You can review the changes accordingly, while we will also update GulpFile.js to properly generate files. We will make sure that the issues you had faced earlier doesn't happen again.

Additionally, we have already invited you our Github Repository. Have a Wonderful Day.

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard