0

The structure of my project looks like this:

enter image description here

And my package.json looks like this:

{
  "name": "personal_site",
  "version": "1.0.0",
  "description": "My personal website.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "node-sass --output-style compressed ./dist/css/bundle.min.css ./src/scss/styles.scss",
    "serve": ""
  },
  "author": "Dean Gibson",
  "license": "ISC",
  "dependencies": {
    "bourbon": "^4.2.6",
    "bourbon-neat": "^1.7.4"
  },
  "devDependencies": {
    "node-sass": "^3.4.2"
  }
}

But when I run npm build it looks like the terminal is "thinking" and it stops without throwing any errors. But nothing gets generated in dist/css/ ... Anything obvious that I'm doing wrong here?

UPDATE:

This is interesting, if I run that exact script directly from terminal then it works fine... Any ideas as to why?

  • did u check access have folder? – Thilina Sampath Mar 21 '16 at 06:03
  • I ran `chmod -R 777 personal_site` and still the problem persists. –  Mar 21 '16 at 06:16
  • Can you put `node -e "console.log(process.cwd())"` as the build script to check if the working directory is correct? – Daniel Diekmeier Mar 21 '16 at 09:30
  • @DanielDiekmeier - Tried that, and the exact same thing happened. It looks like it's doing something for a second or two, then it just exists. Nothing gets printed to the console. No error messages. Nothing. –  Mar 22 '16 at 04:07
  • Aha!! The answer is here: http://stackoverflow.com/questions/29939697/npm-build-doesnt-run-my-build-scripts –  Mar 22 '16 at 04:13

0 Answers0