なぜ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$
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/06/29 22:11