Any reason why gulp build on netlify deploy doesn't inject css/js in html files?

I assume it’s a gulp build problem when deploying because it only injects css/js when I build locally. I tested my problem out and when running locally I see the injected css and js files in the html files. Idk if including a build log would help. I always do get that minor error saying it can’t find ./.env when deploying.

I’m just trying to render a page in a MS Teams tab, but it only shows the Loading… html element. I’m not able to set it in a team tab because the save button is disabled.

Here is the img:

I know it’s hard to see the Loading… text but it’s there.
Any help is appreciated. github: GitHub - BustosAndrew/Integration

@BustosMan Welcome to the Netlify community.

Do you think this error could have anything to do with what you’re reporting?

Did not parse stylesheet at '' because non CSS MIME types are not allowed in strict mode.

I just updated the headers file. Can you take a look at the web page again? @gregraven I’m running into the issue where the console is saying unexpected token <.

@BustosMan Yes, I see that error too.

After speaking with the dev who made the generator-teams package, he’s saying something is misconfigured with my server files. I honestly don’t know what else could be causing these syntax errors. @gregraven

are you needing the .env file for something? any chance something is being excluded by a .gitignore file or its a case issue?

When I build locally then set the publish directory to the build folder, the log says it can’t find a ./.env file. I figured that building locally it would already have included the .env file. Should I exclude the gulp build command if I already build locally? I’m not sure it would resolve the unexpected token < issue. @perry

Is it because I can’t build this with express? :sweat_smile: I’m aware netlify supports express serving static files, but I just realized that none of my react tsx files are in a static folder lol. It actually worked on heroku for the first try. Well, loading the main webpage.

hi again, what are you trying to do with express, specifically? are you trying to spin up a server? :thinking:

Here is a good summary of what you can and can not do on Netlify you might find helpful:

I remember that express can work with netlify if it serves static files. I had a friend tell me earlier that SSR doesn’t work, and that the app I tried deploying was SSR not SPA.

hi @BustosMan it depends if you are trying to intercept user requests in a server-like way (so, a request/response cycle).

is that what you are trying to do? that won’t work. If you are trying to do server side rendering, can you explain in a different way why you need server side rendering? I am still a little bit lost! :sweat_smile: