gatsby-plugin-sass working fine with "gatsby develop" but not after "gatsby build"

Created on 23 Dec 2017  路  4Comments  路  Source: gatsbyjs/gatsby

I am using gatsby-plugin-sass to be able to import scss, which is working with gatsby develop but when i do gastby build the generated style.css doesn't change, by the way, I am not using a custom html.js

here are my dependencies:

"dependencies": {
    "extract-text-webpack-plugin": "^3.0.2",
    "gatsby": "^1.9.149",
    "gatsby-link": "^1.6.32",
    "gatsby-plugin-react-helmet": "^1.0.8",
    "gatsby-plugin-sass": "^1.0.15",
    "gatsby-plugin-typography": "^1.7.10",
    "grommet": "^1.9.0",
    "node-sass": "^4.7.2",
    "prop-types": "^15.6.0",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-helmet": "^5.2.0",
    "sass-loader": "^6.0.6",
    "styled-components": "^2.4.0",
    "typography-theme-lawton": "^0.15.10"
  },

  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "clean": "git clean -xfd .cache public/",
    "format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"src/**/*.js\"",
    "test": "echo \"Error: no test specified\" && exit 1",
    "deploy": "gatsby build && gh-pages -d public --branch master"
  },
  "devDependencies": {
    "gh-pages": "^1.1.0",
    "prettier": "^1.9.2",
    "webpack": "^3.10.0"
  }

ps: I am using the same name like an older issue, because i am experiencing the same problem.

Most helpful comment

I resolved this by running rm -rf node_modules, rm package-lock.json and npm install

All 4 comments

I used node-sass to compile sass to css manually, I imported just the css and it worked.
But I have to do this every time I change the sass file.

Have you checked out https://github.com/gatsbyjs/gatsby/tree/master/examples/using-sass? Does that work on your machine?

Can you figure out what the difference between that and your project is?

I resolved this by running rm -rf node_modules, rm package-lock.json and npm install

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  路  3Comments

signalwerk picture signalwerk  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

benstr picture benstr  路  3Comments

timbrandin picture timbrandin  路  3Comments