-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file to import not found or unreadable: neat #19
Comments
Turns out I have installed node-bourbon. Resolved by Maybe |
👍 |
@sungwoncho here's how I worked around this. I'm using webpack, but this is what I did.
It turned out that the I made the following change in my webpack config:
Note the It might be worth switching this project to only export an includePath for node-neat, and depend on the user to wire up node-bourbon, too, as it seems that's causing more harm than good for some people. |
here's the full commit if you're curious: tedpennings/site@294c7a2 |
Hello Sungwoncho and Tedpennings, I seem to be running into the same problem both of you were experiencing. It doesn't seem to be resolved by either removing node-bourbon (which re-downloads as a dependecy anyway on an npm install --save-dev node-neat . I'm not super familiar with webpack either, but am willing to try just about anything to get this working. I've already burned a days time trying to figure out whats gone wrong. Gulpfile is as follows -
main.scss starts as follows.
I just keep getting the same error over and over. file to import not found or unreadable: neat Any help would be GREATLY appreciated. Best, |
@shawnmmatthews The includePaths: [
require('node-neat').includePaths.concat('./node_modules/breakpoint-sass/stylesheets/'),
], |
Thanks @iamlacroix, but it doesn't seem to have done the trick... I tested to make sure that the array will accept a comma seperated list. I still receive the file to import not found or unreadable when using the .concat line you sent over. It also causes breakpoint-sass to stopworking. Attached is my teams full gulpfile.js that we are trying to add node-neat to. 'use strict'; var gulp = require('gulp'); // Import Gulp Node Package
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var importer = require('node-sass-globbing'),
livereload = require('gulp-livereload'),
ifElse = require('gulp-if-else'),
argv = require('yargs').argv;
var sass_config = { // THE INCLUDES FOR BOTH PROD AND DEV
importer: importer,
includePaths: [
// Not working --- require('node-neat').includePaths.concat('./node_modules/breakpoint-sass/stylesheets/'),
'./node_modules/breakpoint-sass/stylesheets/',
require('bourbon').includePaths,
require('node-neat').includePaths
],
sourcemap: true,
};
gulp.task('sass:prod', function () { // PRODUCTION TASK (OFF)
gulp.src('./sass/**/*.scss')
.pipe(sass(sass_config).on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 version']
}))
.pipe(gulp.dest('./css'));
});
gulp.task('sass:dev', function () {
gulp.src('./sass/**/*.scss') // DEV TASK (ON)
.pipe(sourcemaps.init())
.pipe(sass(sass_config).on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 version']
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./css'))
.pipe(ifElse(argv.livereload, livereload));
});
gulp.task('sass:watch', ['sass:dev'], function () { // WATCH TASK (ON)
if (argv.livereload) {
livereload.listen();
}
gulp.watch('./sass/**/*.scss', ['sass:dev']);
});
gulp.task('default', ['sass:dev', 'sass:watch']); //determines what tasks are being run With my main.scss file containing
It makes it all the way to neat prior to erroring out because of "file to import not found or unreadable: neat Please let me know if you have anything else I should try. I sincerely appreciate your help. I'd really love to get this going. Best, |
@shawnmmatthews Oops, I accidentally left the original array brackets in my example, which won't work since it creates a nested array. Use the following for your includePaths: require('node-neat').includePaths.concat('./node_modules/breakpoint-sass/stylesheets/'), |
@iamlacroix Awesome! THANK YOU... I've been struggling with that all day. It appears to be going through. I'm left with an undefined error. Error in plugin 'sass' I'll see if I can't hunt that down. Best, |
Cool! got it. Had an old copy of bourbon installed that I had been using for "trouble shooting"... THANK YOU AGAIN. |
@shawnmmatthews what was the solution here? I'm having problems with your same error |
This solved it for me thoughtbot/neat#360 but now I get the following warnings:
This thread was also worth a read. lacroixdesign/node-bourbon#37 _(ツ)_/¯ |
I get the error that
neat
is not found while using this module with gulp.Here is my setup:
gulpfile.js
main.scss
@import 'bourbon';
works but the second line throws.require('node-neat').includePaths
returns:And when I go to the path
_neat.scss
definitely exists. What am I missing?The text was updated successfully, but these errors were encountered: