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

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

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

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

JSON

JSON(JavaScript Object Notation)は軽量なデータ記述言語の1つである。構文はJavaScriptをベースとしていますが、JavaScriptに限定されたものではなく、様々なソフトウェアやプログラミング言語間におけるデータの受け渡しが行えるように設計されています。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

gulp

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

Q&A

解決済

1回答

2609閲覧

npm gulp-stylelintをインストールし直しても、'MODULE_NOT_FOUND'となります。。

fuhixx

総合スコア22

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

JSON

JSON(JavaScript Object Notation)は軽量なデータ記述言語の1つである。構文はJavaScriptをベースとしていますが、JavaScriptに限定されたものではなく、様々なソフトウェアやプログラミング言語間におけるデータの受け渡しが行えるように設計されています。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

gulp

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

0グッド

0クリップ

投稿2020/06/29 09:31

編集2020/06/29 10:13

なぜindex.jsが生成されないのでしょうか。
・Node.jsを推奨版にする
・node_modulesを入れ直して再度ローカルインストール
・node_modulesを入れ直してグローバルインストールする
をしても同じでした。。

コードは以下です。
どうかよろしくお願いいたします。

npm

1fuhixx-2:gulptest-stylelint fuhixx$ gulp 2Error: Cannot find module 'stylelint' 3Require stack: 4- /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/gulp-stylelint/src/index.js 5- /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/gulpfile.js 6- /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js 7- /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js 8- /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/index.js 9- /usr/local/lib/node_modules/gulp/bin/gulp.js 10 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15) 11 at Function.Module._load (internal/modules/cjs/loader.js:898:27) 12 at Module.require (internal/modules/cjs/loader.js:1089:19) 13 at require (internal/modules/cjs/helpers.js:73:18) 14 at Object.<anonymous> (/Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/gulp-stylelint/src/index.js:5:28) 15 at Module._compile (internal/modules/cjs/loader.js:1200:30) 16 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) 17 at Module.load (internal/modules/cjs/loader.js:1049:32) 18 at Function.Module._load (internal/modules/cjs/loader.js:937:14) 19 at Module.require (internal/modules/cjs/loader.js:1089:19) { 20 code: 'MODULE_NOT_FOUND', 21 requireStack: [ 22 '/Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/gulp-stylelint/src/index.js', 23 '/Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/gulpfile.js', 24 '/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js', 25 '/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js', 26 '/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/index.js', 27 '/usr/local/lib/node_modules/gulp/bin/gulp.js' 28 ] 29}

以下はnpmで試みたコードの一部です↓

fuhixx-2:gulptest-stylelint fuhixx$ node -v v14.4.0 fuhixx-2:gulptest-stylelint fuhixx$ npm init -y Wrote to /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/package.json: { "name": "gulptest-stylelint", "version": "1.0.0", "description": "", "main": "gulpfile.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" } fuhixx-2:gulptest-stylelint fuhixx$ npm i -D gulp gulp-notify gulp-plumber gulp-sass gulp-sass-glob gulp-html-beautify gulp-stylelint gulp-autoprefixer gulp-uglify browser-sync npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated ^[⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ fetchMetadata: sill resolveWithNewModule ms@2.0.0 check^[⸨░░░░░░░░░░░░░░░░░░⸩ ⠦ loadDep:strip-ansi: sill resolveWithNewModule wrap-ansinpm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 > fsevents@1.2.13 install /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/fsevents > node install.js SOLINK_MODULE(target) Release/.node CXX(target) Release/obj.target/fse/fsevents.o SOLINK_MODULE(target) Release/fse.node > node-sass@4.14.1 install /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/node-sass > node scripts/install.js Cached binary found at /Users/fuhixx/.npm/node-sass/4.14.1/darwin-x64-72_binding.node > node-sass@4.14.1 postinstall /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/node-sass > node scripts/build.js Binary found at /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/node_modules/node-sass/vendor/darwin-x64-72/binding.node Testing binary Binary is fine npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN gulp-stylelint@13.0.0 requires a peer of stylelint@^13.0.0 but none is installed. You must install peer dependencies yourself. npm WARN gulptest-stylelint@1.0.0 No description npm WARN gulptest-stylelint@1.0.0 No repository field. + gulp-sass-glob@1.1.0 + gulp-sass@4.1.0 + gulp-html-beautify@1.0.1 + gulp-stylelint@13.0.0 + gulp-uglify@3.0.2 + gulp@4.0.2 + gulp-notify@3.2.0 + gulp-autoprefixer@7.0.1 + gulp-plumber@1.2.1 + browser-sync@2.26.7 added 677 packages from 458 contributors and audited 677 packages in 24.87s 9 packages are looking for funding run `npm fund` for details found 6 vulnerabilities (3 low, 3 high) run `npm audit fix` to fix them, or `npm audit` for details fuhixx-2:gulptest-stylelint fuhixx$ node -v v12.18.1 fuhixx-2:gulptest-stylelint fuhixx$ npm uninstall -D gulp-stylelint npm WARN gulptest-stylelint@1.0.0 No description npm WARN gulptest-stylelint@1.0.0 No repository field. removed 12 packages and audited 665 packages in 4.249s 8 packages are looking for funding run `npm fund` for details found 6 vulnerabilities (3 low, 3 high) run `npm audit fix` to fix them, or `npm audit` for details fuhixx-2:gulptest-stylelint fuhixx$ npm i -g gulp-stylelint npm WARN gulp-stylelint@13.0.0 requires a peer of stylelint@^13.0.0 but none is installed. You must install peer dependencies yourself. + gulp-stylelint@13.0.0 updated 1 package in 1.194s fuhixx-2:gulptest-stylelint fuhixx$ gulp Error: Cannot find module 'gulp-stylelint' Require stack: - /Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/gulpfile.js - /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js - /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js - /usr/local/lib/node_modules/gulp/node_modules/gulp-cli/index.js - /usr/local/lib/node_modules/gulp/bin/gulp.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15) at Function.Module._load (internal/modules/cjs/loader.js:842:27) at Module.require (internal/modules/cjs/loader.js:1026:19) at require (internal/modules/cjs/helpers.js:72:18) at Object.<anonymous> (/Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/gulpfile.js:13:23) at Module._compile (internal/modules/cjs/loader.js:1138:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) at Module.load (internal/modules/cjs/loader.js:986:32) at Function.Module._load (internal/modules/cjs/loader.js:879:14) at Module.require (internal/modules/cjs/loader.js:1026:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/fuhixx/gulp成功保管ファイル/gulptest-stylelint/gulpfile.js', '/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js', '/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js', '/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/index.js', '/usr/local/lib/node_modules/gulp/bin/gulp.js' ] } fuhixx-2:gulptest-stylelint fuhixx$

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

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

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

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

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

guest

回答1

0

ベストアンサー

Error: Cannot find module 'stylelint'

stylelintをインストールしてください。

投稿2020/06/29 13:36

technocore

総合スコア7209

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

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

fuhixx

2020/06/29 22:11

最初の文を見落としていました。。ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問