digisavvy / some-like-it-neat

A WordPress Theme Using _s, Bourbon + Neat and Theme Hook Alliance
GNU General Public License v2.0
276 stars 61 forks source link

Error on gulp command - bower repsonsible? #67

Closed millo2k closed 9 years ago

millo2k commented 9 years ago

Thought id got everyhting working, then ran 'gulp'. It watfhes the file then crashes out with:

gulp-ruby-sass: directory [22:17:05] Plumber found unhandled error: Error in plugin 'gulp-ruby-sass' Message: error rtl.scss (Line 1: File to import not found or unreadable: ../../assets/bower_components/bi-app-sass/bi-app/bi-app-rtl.

Had a look back at my bower install command and see this: bower invalid-meta bi-app-sass is missing "main" entry in bower.json bower invalid-meta bi-app-sass is missing "ignore" entry in bower.json

Have no idea whats going on or why its so messy

Any ideas?

digisavvy commented 9 years ago

Odd. Try running 'bower install' and then try to run gulp again.

millo2k commented 9 years ago

Yeah I've done it several times. Tried going through the whole install but its the same thing

digisavvy commented 9 years ago

That's really strange. What does your bower.json file look like? Can you paste its contents here?

I'm wondering if you try removing the bower_components folder, then run 'bower install' and then run 'bower update --save' if that helps.

millo2k commented 9 years ago

Tried doing what you said, still no joy.

Bower file is: { "name": "some-like-it-neat", "version": "1.0.1", "homepage": "http://alexhasnicehair.com", "authors": [ "Alex Vasquez alexjvas@gmail.com" ], "dependencies": { "bourbon": "~4.1", "neat": "~1.7", "bi-app-sass": "latest" }, "resolutions": { "bourbon": "~4.2.1" } }

The full error I get is: gulp-ruby-sass: directory [23:26:11] Plumber found unhandled error: Error in plugin 'gulp-ruby-sass' Message: error rtl.scss (Line 1: File to import not found or unreadable: ../../assets/bower_components/bi-app-sass/bi-app/bi-app-rtl. Load paths: /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/components /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/layouts /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/extends /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/mixins ) [23:26:11] Plumber found unhandled error: Error in plugin 'gulp-ruby-sass' Message: error style.scss (Line 1: File to import not found or unreadable: ../../assets/bower_components/bi-app-sass/bi-app/bi-app-ltr. Load paths: /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/components /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/layouts /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/extends /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/mixins )

events.js:74 throw TypeError('Uncaught, unspecified "error" event.'); ^ TypeError: Uncaught, unspecified "error" event. at TypeError (:null:null) at DestroyableTransform.emit (events.js:74:15) at DestroyableTransform.onerror (_stream_readable.js:537:12) at DestroyableTransform.emit (events.js:95:17) at onwriteError (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:250:10) at onwrite (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:268:5) at WritableState.onwrite (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:106:5) at afterTransform (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:104:5) at TransformState.afterTransform (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12) at /Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/index.js:113:9 at /Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/index.js:36:7 at whenSourceMapReady (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:89:16) at Object.whenDone (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:98:14) at processNext (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:105:13) at importFrom (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:79:10) at processNext (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:104:16) at inlineLocalResource (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:290:12) at inline (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:209:10) at importFrom (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:74:7) at processNext (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:104:16) at importFrom (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:73:7) at ImportInliner.process (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:36:10) at /Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:71:41 at process._tickCallback (node.js:442:13)

millo2k commented 9 years ago

Ttied to run through the whole process again, I notice this at the end of installing gulp, after the success message:

npm ERR! EEXIST, open '/Users/Millist/.npm/3b24c421-t-npm-through2-0-6-3-package-tgz.lock' File exists: /Users/Millist/.npm/3b24c421-t-npm-through2-0-6-3-package-tgz.lock Move it away, and try again.

npm ERR! System Darwin 12.4.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Applications/MAMP/htdocs/church/wp-content/themes/new npm ERR! node -v v0.10.35 npm ERR! npm -v 1.4.28 npm ERR! path /Users/Millist/.npm/3b24c421-t-npm-through2-0-6-3-package-tgz.lock npm ERR! code EEXIST npm ERR! errno 47 npm ERR! not ok code 0

digisavvy commented 9 years ago

Hmm. I'd be willing to do a screenshare or something like that to take a closer look.

millo2k commented 9 years ago

Thats very kind, that might be a shout.

I have tried it on my machine at work. There were no error messages in installing anything but once again when it came to running gulp:

gulp-ruby-sass: directory [23:26:11] Plumber found unhandled error: Error in plugin 'gulp-ruby-sass' Message: error rtl.scss (Line 1: File to import not found or unreadable: ../../assets/bower_components/bi-app-sass/bi-app/bi-app-rtl. Load paths: /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/components /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/layouts /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/extends /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/mixins ) [23:26:11] Plumber found unhandled error: Error in plugin 'gulp-ruby-sass' Message: error style.scss (Line 1: File to import not found or unreadable: ../../assets/bower_components/bi-app-sass/bi-app/bi-app-ltr. Load paths: /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/components /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/layouts /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/extends /Applications/MAMP/htdocs/church/wp-content/themes/church/assets/sass/base/mixins )

events.js:74 throw TypeError('Uncaught, unspecified "error" event.'); ^ TypeError: Uncaught, unspecified "error" event. at TypeError (:null:null) at DestroyableTransform.emit (events.js:74:15) at DestroyableTransform.onerror (_stream_readable.js:537:12) at DestroyableTransform.emit (events.js:95:17) at onwriteError (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:250:10) at onwrite (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:268:5) at WritableState.onwrite (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:106:5) at afterTransform (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:104:5) at TransformState.afterTransform (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12) at /Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/index.js:113:9 at /Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/index.js:36:7 at whenSourceMapReady (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:89:16) at Object.whenDone (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:98:14) at processNext (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:105:13) at importFrom (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:79:10) at processNext (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:104:16) at inlineLocalResource (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:290:12) at inline (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:209:10) at importFrom (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:74:7) at processNext (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:104:16) at importFrom (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:73:7) at ImportInliner.process (/Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js:36:10) at /Applications/MAMP/htdocs/church/wp-content/themes/church/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js:71:41 at process._tickCallback (node.js:442:13)

millo2k commented 9 years ago

Its worth mentioning that on both my home and work machines I installed the theme about a week ago and are working fine. For some reason the bower components/bi-app-sass folder is empty on the new installs

digisavvy commented 9 years ago

That's interesting. I have time this weekend to work with you. Certainly strange. I'm also wondering if you get this same issue with previous versions, too. Let's try to hash out a time to do a screenshare.

jacobarriola commented 9 years ago

Hey there,

I found similar symptoms when using gulp-ruby-sass. It seems as though the plugin was bringing in files from other projects, which caused a lot of the similar errors you are getting. Apparently, the plugin creates a temp folder to do its magic. Unless specified it will call it ‘gulp-ruby-sass’, which is why files from multiple projects were getting mixed up. Documentation is in the readme.md file, ~line 109

Here is what helped me (assumption: you are running gulp-ruby-sass > 1.x & sass > 3.4.x):

For the gulp-ruby-sass plugin: add the ‘container’ parameter: container: ‘uniqueName’

gulp.task('styles', function() { return sass('./assets/sass/app.scss', { style: 'expanded', lineNumbers: true, container: ‘USE THE UNIQUE NAME OF YOUR PROJECT HERE -> myproject'

    })
    .on('error', notify.onError(function(error) {
        return "Error: " + error.message;
    }))
    .pipe(autoprefixer()) // our autoprefixer - add and remove vendor prefixes using caniuse.com <http://caniuse.com/>
    .pipe(gulp.dest('assets/css')) // Location of our app.css file
    .pipe(browserSync.reload({stream:true})) // CSS injection when app.css file is written
    .pipe(rename({suffix: '.min'})) // Create a copy version of our compiled app.css file and name it app.min.css
    .pipe(minifycss({
        keepSpecialComments:0
    })) // Minify our newly copied app.min.css file
    .pipe(gulp.dest('assets/css')) // Save app.min.css onto this directory  
    .pipe(browserSync.reload({stream:true})) // CSS injection when app.min.css file is written
    .pipe(notify({
        message: "Styles task complete!"
    }));

});

Hope this helps!

Jacob

On Mar 20, 2015, at 9:37 AM, Alex Vasquez <notifications@github.com mailto:notifications@github.com> wrote:

That's interesting. I have time this weekend to work with you. Certainly strange. I'm also wondering if you get this same issue with previous versions, too. Let's try to hash out a time to do a screenshare.

— Reply to this email directly or view it on GitHub https://github.com/digisavvy/some-like-it-neat/issues/67#issuecomment-84063828.

millo2k commented 9 years ago

Thanks for the help guys. I just really think something has changed in the last few commits to stop the folder bringing in the required files. Think I might just use the older version that seems to work on my machines. Perhaps I'll try a new version a little way down the line. Thanks guys

digisavvy commented 9 years ago

Yeah, I'm going to work on this, this weekend. I agree a commit might have bombed something out.

But, for me to reproduce, I should clone down a new version of the repo?

digisavvy commented 9 years ago

I can't seem to replicate the issue you're experiencing. I'd still like to hop on a screenshare. The errors you see when bower installs bi-app-sass I also see, but it does resolve correctly and downloads bi-app-sass for me, so that's also curious. If you have some time, let me know when works. I know we have a time difference, so I'm open.

adrianocr commented 9 years ago

Anyway I can reopen this issue? I'm having the same problem.

mroesele commented 9 years ago

In my case the folder /assets/bower_components was empty. For me, running 'bower install' again solved the problem.