Reputation: 1342
I already installed the MSBuild tools, downloaded the current Node.js version, deleted the libvips
files, and still Gatsby can´t install a simple theme from the Starters.
I´m on Windows 10.
[4/4] Building fresh packages...
[-/5] ⠁ waiting...
[2/5] ⠁ sharp
[-/5] ⠁ waiting...
[-/5] ⠁ waiting...
error C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp: Command failed.
Exit code: 7
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp
Output:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.6.1/libvips-8.6.1-win32-x64.tar.gz
info sharp Creating C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp\build\Release
info sharp Copying DLLs from C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp\vendor\lib to C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp\build\Release
prebuild-install WARN install No prebuilt binaries found (target=15.13.0 runtime=node arch=x64 platform=win32)
C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp>if not defined npm_config_node_gyp (node "D:\nodejs15130\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\momom\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.9.2 found at "C:\Python39\python.exe"
gyp info find VS using VS2017 (15.9.28307.1440) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python39\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\momom\\Desktop\\dsd\\metdig\\node_modules\\sharp\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\momom\\AppData\\Local\\node-gyp\\Cache\\15.13.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\momom\\AppData\\Local\\node-gyp\\Cache\\15.13.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\momom\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\15.13.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\momom\\Desktop\\dsd\\metdig\\node_modules\\sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\momom\\Desktop\\dsd\\metdig\\node_modules\\sharp\\build',gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files\visualStudio\MSBuild\Current\Bin\MSbuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files\visualStudio\MSBuild\Current\Bin\MSbuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
gyp ERR! stack at onErrorNT (node:internal/child_process:480:16)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:81:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "D:\\nodejs15130\\node.exe" "C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp
gyp ERR! node -v v15.13.0
gyp ERR! node-gyp -v v8.0.0
momom@Serein2020 MINGW64 ~/Desktop/dsd/metdig
$ npm i gatsby-plugin-sharp
npm notice
npm notice New minor version of npm available! 7.7.6 -> 7.8.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.8.0
npm notice Run npm install -g [email protected] to update!
npm notice
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=0.10.0 <7' },
npm WARN EBADENGINE current: { node: 'v15.13.0', npm: '7.7.6' }
npm WARN EBADENGINE }
changed 78 packages, and audited 1934 packages in 19s
78 packages are looking for funding
run `npm fund` for details
59 vulnerabilities (30 low, 6 moderate, 21 high, 2 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
momom@Serein2020 MINGW64 ~/Desktop/dsd/metdig
$ yarn
yarn install v1.22.4
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other
than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning gatsby > [email protected]: � Thanks for using Babel: we recommend using
babel-preset-env now: please read https://babeljs.io/env to update!
warning gatsby > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3
with 15x less dependencies.
warning gatsby > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning gatsby > babel-polyfill > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning gatsby > babel-runtime > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning gatsby > gatsby-plugin-page-creator > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning gatsby > gatsby-cli > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning gatsby > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > [email protected]: 'postcss-cssnext' has been deprecated in favor of
'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/
warning gatsby > socket.io > [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have
a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
warning gatsby > webpack-validator > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version
to get the best features, bug fixes, and security patches. If you are unable to upgrade at
this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > babel-core > babel-register > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning gatsby > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning gatsby > gatsby-1-config-extract-plugin > [email protected]: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
warning gatsby > joi > [email protected]: This version has been deprecated in accordance with the
hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > webpack-validator > joi > [email protected]: This version has been deprecated in
accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > joi > [email protected]: This version has been deprecated in accordance with the
hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > webpack-validator > joi > [email protected]: This version has been deprecated in
accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > joi > topo > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > postcss-cssnext > autoprefixer > [email protected]: Browserslist 2 could
fail on reading Browserslist >3.0 config used in other tools.
warning gatsby > postcss-cssnext > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning gatsby > postcss-cssnext > pixrem > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning gatsby > postcss-import > [email protected]: Not maintained anymore.
warning gatsby > react > fbjs > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the
actual version of core-js@3.
warning gatsby > remote-redux-devtools > [email protected]: Package moved to @redux-devtools/app.
warning gatsby > remote-redux-devtools > [email protected]: Package moved to @redux-devtools/instrument.
warning gatsby > socket.io > engine.io > [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4
<4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
warning gatsby > socket.io > socket.io-parser > [email protected]: Debug versions >=3.2.0 <3.2.7
|| >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
warning gatsby > webpack > watchpack > [email protected]: Chokidar 2 will break on node v14+.
Upgrade to chokidar 3 with 15x less dependencies.
warning gatsby > webpack-validator > joi > [email protected]: This module has been deprecated in
accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version of hapi to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning gatsby > css-loader > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning gatsby > postcss-import > pkg-resolve > jspm > [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning gatsby > remote-redux-devtools > redux-devtools-core > [email protected]: Package moved to @redux-devtools/serialize.
warning gatsby > postcss-import > pkg-resolve > jspm > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning gatsby > postcss-import > pkg-resolve > jspm > jspm-npm > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning gatsby > postcss-import > pkg-resolve > jspm > jspm-github > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning gatsby > postcss-import > pkg-resolve > jspm > request > [email protected]: this
library is no longer supported
warning gatsby > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning gatsby > chokidar > readdirp > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning gatsby-plugin-offline > [email protected]: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
warning gatsby-plugin-offline > sw-precache > [email protected]: Please migrate to Workbox:
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
warning gatsby-plugin-sharp > probe-image-size > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning gatsby-plugin-sharp > imagemin-pngquant > pngquant-bin > bin-wrapper > download > gulp-decompress > [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
warning gatsby-remark-copy-linked-files > cheerio > [email protected]: Use cheerio-select instead
warning gatsby-source-filesystem > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning gatsby-source-filesystem > babel-cli > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding
it from installation.
[3/4] Linking dependencies...
warning "gatsby > [email protected]" has incorrect peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
warning "gatsby > [email protected]" has unmet peer dependency "caniuse-db@^1.0.30000652".
warning "gatsby-plugin-react-helmet > [email protected]" has unmet peer dependency "react@>=15.0.0".
warning "gatsby-plugin-react-helmet > react-helmet > [email protected]" has unmet peer dependency "react@^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0".
warning "gatsby-transformer-remark > [email protected]" has unmet peer dependency "graphql@>=0.4.0".
[4/4] Building fresh packages...
[-/5] ⠈ waiting...
[2/5] ⠈ sharp
[-/5] ⠁ waiting...
[-/5] ⠁ waiting...
error C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp: Command failed.
Exit code: 7
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp
Output:
info sharp Using cached C:\Users\momom\AppData\Roaming\npm-cache\_libvips\libvips-8.6.1-win32-x64.tar.gz
info sharp Creating C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp\build\Release
info sharp Copying DLLs from C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp\vendor\lib to C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp\build\Release
prebuild-install WARN install No prebuilt binaries found (target=15.13.0 runtime=node arch=x64 platform=win32)
C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp>if not defined npm_config_node_gyp (node "D:\nodejs15130\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\momom\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.9.2 found at "C:\Python39\python.exe"
gyp info find VS using VS2017 (15.9.28307.1440) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python39\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\momom\\Desktop\\dsd\\metdig\\node_modules\\sharp\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\momom\\AppData\\Local\\node-gyp\\Cache\\15.13.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\momom\\AppData\\Local\\node-gyp\\Cache\\15.13.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\momom\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\15.13.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\momom\\Desktop\\dsd\\metdig\\node_modules\\sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\momom\\Desktop\\dsd\\metdig\\node_modules\\sharp\\build',gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files\visualStudio\MSBuild\Current\Bin\MSbuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files\visualStudio\MSBuild\Current\Bin\MSbuild.exe ENOENT
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
gyp ERR! stack at onErrorNT (node:internal/child_process:480:16)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:81:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "D:\\nodejs15130\\node.exe" "C:\\Users\\momom\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\momom\Desktop\dsd\metdig\node_modules\sharp
gyp ERR! node -v v15.13.0
gyp ERR! node-gyp -v v8.0.0
Upvotes: 1
Views: 288
Reputation: 29320
To me, it's failing due to some Visual Studio issue, not a sharp, because of the following command:
gyp ERR! stack Error: spawn C:\Program Files\visualStudio\MSBuild\Current\Bin\MSbuild.exe ENOENT
It seems that your machine is not taking the proper version of the windows-build-tools
or the msvs
, which needs to be 2015, as the docs shows:
npm install --global windows-build-tools --vs2015
According to some similar issues, the issue can be resolved by:
npm config set msvs_version 2015
Other users needed to set Python version to 2.7 by:
npm config set python python2.7
Upvotes: 1