PacktPublishing / starter-blog

Hands-On Web Development with React and GatsbyJS [Video], by Packt Publishing
8 stars 13 forks source link

Cannot run gatsby develop #1

Open harryhaigh opened 3 years ago

harryhaigh commented 3 years ago

Hi I have just purchased this tutorial package to learn more about Gatsby. I have cloned the master git as per the video 1_3. When I ran npm install i get the following error.

Any help would be greatly appreciated.

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 @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated axios@0.20.0: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm WARN deprecated axios@0.20.0: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm ERR! code 1 npm ERR! path C:\Users\hazza\React\starter-blog\node_modules\sharp npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@15.5.1 | win32 | x64 npm ERR! gyp info find Python using Python version 3.7.4 found at "C:\Users\hazza\AppData\Local\Programs\Python\Python37-32\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:340:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:376:20) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1063:16) npm ERR! gyp ERR! System Windows_NT 10.0.19041 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\Users\hazza\React\starter-blog\node_modules\sharp npm ERR! gyp ERR! node -v v15.5.1 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hazza\AppData\Local\npm-cache_logs\2021-02-27T04_52_06_598Z-debug.log PS C:\Users\hazza\React\starter-blog> gatsby develop success open and validate gatsby-configs - 0.103s

ERROR

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp.node' Require stack:

rachellerathbone commented 3 years ago

I just cloned this repo, ran npm i, and gatsby develop and ran into no issues so am unable to reproduce your error. What version of node are you running? Course prereqs say to have at least 8 but I'd say to make sure you have at least 10.