「npm install」を実行しようとした後、このエラーが発生して続行できず、gradle ビルドを正常に実行することさえできません。
Unable to save binary C:\path\node_modules\node-sass\vendor\win32-x64-59: { Error: ENOENT: no such file or directory, mkdir 'C:\path\node_modules\node-sass\vendor\win32-x64-59'
at Object.fs.mkdirSync (fs.js:909:18)
at checkAndDownloadBinary (C:\path\node_modules\node-sass\scripts\install.js:113:8)
at Object.<anonymous> (C:\path\node_modules\node-sass\scripts\install.js:156:1)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Function.Module.runMain (module.js:703:10)
at startup (bootstrap_node.js:193:16)
errno: -4058,
code: 'ENOENT',
syscall: 'mkdir',
path: 'C:\path\\node_modules\\node-sass\\vendor\\win32-x64-59' }
.npmrc ファイルを編集してみました。最初に、使用できない URL からダウンロードしようとしているというエラーが報告されたため、この行を追加しました。
sass_binary_site=https://github.com/sass/node-sass/releases/download/v4.13.1/win32-x64-79_binding.node
また、「gradle uberClean」、「npm uninstall node-sass」、および「npm install node-sass」を実行し、node-modules を削除してビルドを最初からやり直しました。何も機能しませんでした。同時にpythonエラーも報告しますが、関連しているかどうかはわかりません。
Building: C:\path\.gradle\nodejs_9.6.0\node-v9.6.0-win-x64\node.exe C:\path\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\path\\.gradle\\nodejs_9.6.0\\node-v9.6.0-win-x64\\node.exe',
gyp verb cli 'C:\path\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@7.1.2
gyp info using node@9.6.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python checking Python explicitly set from command line or npm configuration
gyp verb find Python - "--python=" or "npm config get python" is "C:\Program Files\Python37\python.exe"
gyp verb find Python - executing "C:\Program Files\Python37\python.exe" to get executable path
gyp verb find Python - executable path is "C:\Program Files\Python37\python.exe"
gyp verb find Python - executing "C:\Program Files\Python37\python.exe" to get version
gyp verb find Python - version is "3.7.9"
gyp info find Python using Python version 3.7.9 found at "C:\Program Files\Python37\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 9.6.0
gyp verb command install [ '9.6.0' ]
gyp verb install input version string "9.6.0"
gyp verb install installing version: 9.6.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 9.6.0
gyp verb ensuring nodedir is created C:\Users\bryce.eller\AppData\Local\node-gyp\Cache\9.6.0
gyp WARN install got an error, rolling back install
gyp verb command remove [ '9.6.0' ]
gyp verb remove using node-gyp dir: C:\Users\bryce.eller\AppData\Local\node-gyp\Cache
gyp verb remove removing target version: 9.6.0
gyp verb remove removing development files for version: 9.6.0
gyp ERR! configure error
gyp ERR! stack Error: ENOENT: no such file or directory, mkdir 'C:\Users\bryce.eller\AppData\Local\node-gyp\Cache\9.6.0'gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\path\\.gradle\\nodejs_9.6.0\\node-v9.6.0-win-x64\\node.exe" "C:\path\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\path\node_modules\node-sass
gyp ERR! node -v v9.6.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN leaflet.markercluster@1.4.1 requires a peer of leaflet@~1.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@6.0.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@6.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\path\npm-cache\_logs\2021-08-05T14_12_09_736Z-debug.log
ビルドを再び正常に動作させるためのヒントは素晴らしいでしょう! 前もって感謝します!