質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

gulp

gulpは、Node.jsをベースとしたタスク自動化ツールの一つ。ストリームでファイルを処理することが特徴です。CSSプリプロセッサの使用時のコンパイルや、CSS・JavaScriptファイルの圧縮・結合などを自動的に行うことができます。

Q&A

1回答

2956閲覧

stylelintの記述をgulp.jsから外すとうまくいくのですが、stylelintの記述を入れるとError: No configuration foundとエラーが出ます。

退会済みユーザー

退会済みユーザー

総合スコア0

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

gulp

gulpは、Node.jsをベースとしたタスク自動化ツールの一つ。ストリームでファイルを処理することが特徴です。CSSプリプロセッサの使用時のコンパイルや、CSS・JavaScriptファイルの圧縮・結合などを自動的に行うことができます。

0グッド

0クリップ

投稿2016/06/18 04:30

stylelintの記述をgulp.jsから外すとうまくいくのですが、stylelintの記述を入れるとError: No configuration foundとエラーが出ます。
どなたか理由がわかりませんでしょうか?
stylelintの記述を外すとうまくいきます。

・stylelintインストール時

C:\Users\user\Desktop\images\gulp-folder\postcss>npm install --save-dev npm install stylelint npm WARN prefer global npm@3.9.6 should be installed with -g npm WARN prefer global colorguard@1.2.0 should be installed with -g postcss@1.0.0 C:\Users\user\Desktop\images\gulp-folder\postcss +-- install@0.8.1 +-- npm@3.9.6 | +-- abbrev@1.0.7 | +-- ansi-regex@2.0.0 | +-- ansicolors@0.3.2 | +-- ansistyles@0.1.3 | +-- aproba@1.0.3 | +-- archy@1.0.0 | +-- chownr@1.0.1 | +-- cmd-shim@2.0.2 | +-- columnify@1.5.4 | | `-- wcwidth@1.0.0 | | `-- defaults@1.0.3 | | `-- clone@1.0.2 | +-- config-chain@1.1.10 | | `-- proto-list@1.2.4 | +-- debuglog@1.0.1 | +-- dezalgo@1.0.3 | | `-- asap@2.0.3 | +-- editor@1.0.0 | +-- fs-vacuum@1.2.9 | +-- fs-write-stream-atomic@1.0.8 | +-- fstream@1.0.8 | +-- fstream-npm@1.1.0 | | `-- fstream-ignore@1.0.5 | | `-- minimatch@3.0.0 | | `-- brace-expansion@1.1.4 | | +-- balanced-match@0.4.1 | | `-- concat-map@0.0.1 ~ npm WARN postcss@1.0.0 No description npm WARN postcss@1.0.0 No repository field.

・トランスパイル時

C:\Users\user\Desktop\images\gulp-folder\postcss>gulp css (node:4856) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. [13:20:27] Using gulpfile ~\Desktop\images\gulp-folder\postcss\gulpfile.js [13:20:27] Starting 'css'... events.js:160 throw er; // Unhandled 'error' event ^ Error: No configuration found at exports.default (C:\Users\user\Desktop\images\gulp-folder\postcss\node_modules\stylelint\dist\utils\configurationError.js:8:13) at C:\Users\user\Desktop\images\gulp-folder\postcss\node_modules\stylelint\dist\buildConfig.js:43:54

・gulpfile.js

//gulpfile.js var gulp = require('gulp'); //gulpをインポート var postcss = require('gulp-postcss'); //gulp-postcssをインポート var cssnext = require('postcss-cssnext'); //cssnextをインポート var nested = require('postcss-nested'); var stylelint = require('stylelint'); gulp.task('css', function () { //”css”タスクを登録 var plugins = [ cssnext, //一旦空の配列を作成 nested, stylelint ]; return gulp.src('./src-before/*.css') //src-before下にある.cssファイルを指定 .pipe(postcss(plugins)) //PostCSSにファイルを処理してもらう .pipe(gulp.dest('./dest-after')); //生成されたCSSをdest-after下に配置 });

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

投稿2016/06/18 09:06

horse_n_deer

総合スコア452

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問