Deployed site without css

I deployed my site fine locally and now trying through github. My site has no css at all and i use scss too. How do i add css to the site / and make sure it uses scss?

https://lukasjakobsen-portfolio.netlify.app/

package.json file

{
“name”: “my-portfolio”,
“version”: “1.0.0”,
“description”: “Lukas Portfolio”,
“main”: “index.js”,
“scripts”: {
“test”: “echo "Error: no test specified" && exit 1”,
},
“repository”: {
“type”: “git”,
“url”: “git+https://github.com/Draxlicious/my-portfolio.git”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“bugs”: {
“url”: “Issues · Draxlicious/my-portfolio · GitHub
},
“homepage”: “GitHub - Draxlicious/my-portfolio: Lukas Portfolio
}

Deploy log
`
12:30:13 PM: Build ready to start

12:30:15 PM: build-image version: 30f629161c0736b1a3ecd8b418e5eeffab5c0faf

12:30:15 PM: build-image tag: v3.3.14

12:30:15 PM: buildbot version: a383ed3390159974f55f285b04457b44cb49efb0

12:30:15 PM: Fetching cached dependencies

12:30:15 PM: Starting to download cache of 254.3KB

12:30:15 PM: Finished downloading cache in 64.50982ms

12:30:15 PM: Starting to extract cache

12:30:15 PM: Failed to fetch cache, continuing with build

12:30:15 PM: Starting to prepare the repo for build

12:30:16 PM: No cached dependencies found. Cloning fresh repo

12:30:16 PM: git clone GitHub - Draxlicious/my-portfolio: Lukas Portfolio

12:30:17 PM: Preparing Git Reference refs/heads/master

12:30:18 PM: No build command found, continuing to publishing

12:30:18 PM: Starting to deploy site from ‘public’

12:30:18 PM: Creating deploy tree

12:30:18 PM: Creating deploy upload records

12:30:18 PM: 0 new files to upload

12:30:18 PM: 0 new functions to upload

12:30:18 PM: Starting post processing

12:30:18 PM: Post processing done

12:30:19 PM: Site is live

12:30:20 PM: Finished processing build request in 5.322743063s
`

How do you build your site locally? You’ve configured no build command here, so we won’t “do anything” to the files in GitHub - we’ll deploy them exactly as is, whatever is in the public directory.

I see that in your repo, you have styles.css here:

But on your webpage, you try to load “dist/styles.css” which does not exist in your repo:

image

which makes me suspect that you perhaps have some “build process” we are not doing.

What do you mean how i build my site locally? It seems like it is some kind of build command error i get. If i try use npm run build it works in my project. I’m not sure with im missing here

2:04:51 PM: ​
2:04:51 PM: ┌─────────────────────────────┐
2:04:51 PM: │ “build.command” failed │
2:04:51 PM: └─────────────────────────────┘
2:04:51 PM: ​
2:04:51 PM: Error message
2:04:51 PM: Command failed with exit code 1: npm run build
2:04:51 PM: ​
2:04:51 PM: Error location
2:04:51 PM: In Build command from settings:
2:04:51 PM: npm run build
2:04:51 PM: ​
2:04:51 PM: Resolved config
2:04:51 PM: build:
2:04:51 PM: command: npm run build
2:04:51 PM: publish: /opt/build/repo/public

package.json
“build”: “sass --watch public/src/scss/:public/dist/css”

hey lukas, we always recommend you test our site works as expected off our system before you start deploying it on our system. If your sass compiles and renders perfectly on your machine, and breaks on deploy, we know that the error is due to some configuration on netlify.

if you don’t test it locally first, we have no way of knowing that.

You’ll need to figure out how to build your site locally first (and confirm that there are no errors) before we can troubleshoot your deployment onto netlify :slight_smile:

Hi Perry
I have now tried deploy it locally and the scss here seems to work even tho some of the images path is wrong but thats ok.
Here on locally deploy i cannot set a build command and test it without attaching it to a git repository, so its hard for me to tell. I’ve tried with Environment variable but idk if im totally off

My locally deploy:
https://lukasjakobsen.netlify.app/

Hey @LukasJakobsen,

I’m not sure how you’ve got things set up over there but your site is rendering just fine for me, minus 3 assets which are 404-ing. You may need to look a little closer to home if you’re still experiencing any issues! :slight_smile: