gatsby-simplefolio
gatsby-simplefolio copied to clipboard
Unable to install dependencies
I've seen another similar issue, but I'm getting slightly different errors. I'm unable to install the dependencies at the moment.
Has anyone stumbled upon this, previously?
I've also attached the complete log. log.txt
npm ERR! code 1
npm ERR! path C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\anton\\Documents\\Projects\\personal-website-3\\personal-website-3\\gatsby-simplefolio\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-gyp\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Python310\python.EXE
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\anton\\Documents\\Projects\\personal-website-3\\personal-website-3\\gatsby-simplefolio\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\anton\Documents\Projects\personal-website-3\personal-website-3\gatsby-simplefolio\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\anton\AppData\Local\npm-cache\_logs\2022-02-07T10_10_11_886Z-debug.log
any solution found for it?
@onkarnirhali no, not really. Have you experienced the same issue?
This error is caused by your current version of node which you'll see if you run node -v
is too new for the node sass dependency.
How I fixed it:
Go to https://github.com/sass/node-sass/releases/ to see which version of node the node-sass module requires which is 13.14.0 (maybe 14 as well).
In the terminal run nvm install 13.14.0
This should automatically switch you to that version but if it doesn't run nvm use 13.14.0
after it's installed. Then run node -v
to check it's the right version.
Do a quick npm install
or yarn install
and you should be good to run gatsby develop
.
Lastly for windows users you'll have to install 'nvm for windows', instructions can be found here: https://stackoverflow.com/questions/25654234/why-isnt-node-version-manager-nvm-recognized-on-windows , and make note that you might have to run your terminal (I use git bash) as the administrator for it to allow nvm to switch node versions.
Enjoy. Lastly if your issues do persist maybe think about pulling the new version of this repo on the develop branch and transfer your content over manually rather than waist hours trying to get this environment up to date.
Thank you very much, @dannyr22. I will try this one out.
Had the same issue and it worked for me when I downgrade node version to 14.x which is currently supported by node-sass Thank you @dannyr22
Thank you dannyr22