mrmrs / nkd

Template for jekyll project with postcss and browser-sync
http://mrmrs.io/nkd
229 stars 26 forks source link

npm install gulp-sass error #22

Open alextrastero opened 8 years ago

alextrastero commented 8 years ago

There seems to be an issue on fresh install

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/binding/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/alex/dev/alextrastero.github.io/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Build failed
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! node-sass@0.9.6 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@0.9.6 install script 'node build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/alex/dev/alextrastero.github.io/npm-debug.log
alextrastero commented 8 years ago

I'm trying again after npm i gulp-sass

alextrastero commented 8 years ago

nope, still nothing, something to do with node-sass

mrmrs commented 8 years ago

@alextrastero - this ticket is a good motivator for me to deprecate sass and just jump over to a proper postcss build.

alextrastero commented 8 years ago

@mrmrs and webpack? :trollface:

mrmrs commented 8 years ago

I am very bad at webpack but if you want to make a PR I would gladly accept.

chriswhawkins commented 8 years ago

@alextrastero try editing your package file to use the latest browser-sync, gulp, and gulp-sass.

   "devDependencies": {
    "browser-sync": "^2.11.2",
    "gulp": "~3.9.1",
    "gulp-autoprefixer": "0.0.5",
    "gulp-csslint": "~0.1.3",
    "gulp-imagemin": "~0.1.4",
    "gulp-jekyll": "0.0.0",
    "gulp-minify-css": "~0.3.5",
    "gulp-rename": "^1.2.0",
    "gulp-rimraf": "^0.1.0",
    "gulp-sass": "~2.2.0",
    "gulp-shell": "^0.2.11",
    "gulp-size": "^0.4.0",
    "gulp-svgmin": "~0.4.1",
    "gulp-util": "~2.2.12",
    "gulp-watch": "^0.6.8",
    "imagemin-pngcrush": "^1.0.0",
    "jshint-stylish": "~0.1.5"
  },
alextrastero commented 8 years ago
"devDependencies": {
    "browser-sync": "*",
    "gulp": "*",
    "gulp-autoprefixer": "*",
    "gulp-csslint": "*",
    "gulp-imagemin": "*",
    "gulp-jekyll": "*",
    "gulp-minify-css": "*",
    "gulp-rename": "*",
    "gulp-rimraf": "*",
    "gulp-sass": "*",
    "gulp-shell": "*",
    "gulp-size": "*",
    "gulp-svgmin": "*",
    "gulp-util": "*",
    "gulp-watch": "*",
    "imagemin-pngcrush": "*",
    "jshint-stylish": "*"
  }

npm update --save-dev

Seemed to have fixed that :)

Now npm start throws

> gulp

[17:09:18] Using gulpfile ~/dev/alextrastero.github.io/gulpfile.js
[17:09:18] Starting 'pre-process'...
[17:09:18] 'pre-process' errored after 8.36 ms
[17:09:18] Error in plugin 'gulp-watch'
Message:
    glob should be String or Array, not function
chriswhawkins commented 8 years ago

I left gulp-watch versioning in place and don't get any errors, but live reload is not working at all.

vladmocanu commented 8 years ago

It seems the browser-sync doesn't work. I have the same issues as you @chriswhawkins