Gulpでscssのコンパイルをしたいです。
https://ics.media/entry/3290/
このサイトを見ながら、Gulpの導入からscssのコンパイルについて学んでいたのですが、タスクの実行でつまづいてしまいました。
コマンドプロンプトでnpx gulpと入力してもコンパイルされずに、エラーメッセージが出てしまいます。
エラーメッセージ(ユーザー名は★★★で隠しています)
C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test>npx gulp C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test\node_modules\node-sass\lib\binding.js:15 throw new Error(errors.missingBinary()); ^ Error: Missing binding C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test\node_modules\node-sass\vendor\win32-x64-72\binding.node Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 12.x Found bindings for the following environments: - Windows 64-bit with Node.js 10.x This usually happens because your environment has changed since running `npm install`. Run `npm rebuild node-sass` to download the binding for your current environment. at module.exports (C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test\node_modules\node-sass\lib\binding.js:15:13) at Object.<anonymous> (C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test\node_modules\node-sass\lib\index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:945:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10) at Module.load (internal/modules/cjs/loader.js:798:32) at Function.Module._load (internal/modules/cjs/loader.js:711:12) at Module.require (internal/modules/cjs/loader.js:838:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.<anonymous> (C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test\node_modules\gulp-sass\index.js:162:21) at Module._compile (internal/modules/cjs/loader.js:945:30)
試したこと
https://dev.classmethod.jp/node-js/node-sass-could-not-find-a-binding/
このサイトを見て紹介されているコマンドを入力しましたが、ダメでした。
コマンドを実行するディレクトリに間違いはないはずです。
最初に紹介したページに書いてあるgulpのインストール等で必要なファイル、フォルダは全て
C:\Users\★★★\OneDrive\デスクトップ\物置小屋\gulp-test
の階層に揃っています。何が原因なのでしょうか。
Windowsの仕様
エディション Windows10 Pro
バージョン 1903
あなたの回答
tips
プレビュー