Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

NPM Error - Grunt Build #386

Closed
brettlewis opened this issue Jul 17, 2015 · 7 comments
Closed

NPM Error - Grunt Build #386

brettlewis opened this issue Jul 17, 2015 · 7 comments

Comments

@brettlewis
Copy link

On OSX, latest versions.

npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! foundationpress@5.5.2 build: `grunt build`
npm ERR! Exit status 6
npm ERR! 
npm ERR! Failed at the foundationpress@5.5.2 build script 'grunt build'.
npm ERR! This is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt build
npm ERR! You can get their info via:
npm ERR!     npm owner ls foundationpress
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/USER/Documents/DIRECTORY/wp-content/themes/THEMENAME/npm-debug.log```
@olefredrik
Copy link
Owner

Hi. I made a quick screencast on installing FoundationPress with npm.
Check it out on YouTube

@brettlewis
Copy link
Author

For reference, this installation of FoundationPress was working fine for about a week. I started to receive this error from time to time about two days ago on Build and Watch. Watch would frequently stop watching and spit out an error like this one. This is the only node app I've had this happen with, I also saw a few other people post this same issue.

I was able to fix it by completely uninstalling all traces of npm and reinstalling. Not sure how FoundationPress could possibly effect the install, but something got corrupted during a build.

@thewebsitedev
Copy link
Contributor

Installed FoundationPress today and faced this same issue. Reinstalling npm and then reinstalling FoundationPress worked fine for me. Thanks @brettlewis !

@brettlewis
Copy link
Author

After hours of testing and intermittent errors, I found that problem is exclusive to building SCSS. In one instance, I was able to trigger the error when adding top-bar settings into the custom-settings.scss file. When I would delete these setting, the error would go away. Paste them back in, the error would return. This was happening in a few different scss files when adding new settings or site styles.

What could be causing this?

@brettlewis
Copy link
Author

I've narrowed it down to incompatible versions of grunt-sass and node-sass.

Changing these values to the latest versions stopped build/watch from blaming SASS errors on FoundationPress package scripts and instead now functions as intended.

Node: v0.12.7
NPM: v2.11.3

{
  "name": "foundationpress",
  "version": "5.5.2",
  "devDependencies": {
    "bower": "^1.4.1",
    "grunt": "~0.4.1",
    "grunt-cli": "^0.1.13",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-copy": "~0.4.1",
    "grunt-contrib-uglify": "~0.2.7",
    "grunt-contrib-watch": "~0.5.3",
    "grunt-sass": "1.0.0",
    "grunt-string-replace": "~0.2.7",
    "node-sass": "3.2.0"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/olefredrik/FoundationPress.git"
  },
  "dependencies": {
    "time-grunt": "^1.1.0"
  },
  "scripts": {
    "build": "grunt build",
    "grunt": "grunt",
    "postinstall": "bower install && grunt build",
    "watch": "grunt watch"
  }
}

@olefredrik
Copy link
Owner

Thanks @brettlewis . Fixed #400

@brettlewis
Copy link
Author

no problem. happy to help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants