Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby shows up on Git CMD not on Git Bash. Starter installation error also. #23313

Closed
theboyonline opened this issue Apr 20, 2020 · 1 comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@theboyonline
Copy link

Description

1 . I had installed gatsby through Git bash.
bash throwing error when "gatsby new ...." command is given, It can read "npx gatsby new...." but given an error in the end.

  1. bash throwing error :
    bash: gatsby: command not found when given "gatsby new ... command" without npx.

Ran through Git bash

C:\Users\ACER>npm -g ls --depth=0
C:\usr\local
`-- [email protected]

npm ERR! error in C:\usr\local\node_modules\gatsby-cli\node_modules\fsevents: ENOENT: no such file or directory, open 'C:\usr\local\node_modules\gatsby-cli\node_modules\fsevents\package.json'
npm ERR! peer dep missing: eslint@>= 4.12.1, required by [email protected]
npm ERR! peer dep missing: webpack@>=2, required by [email protected]
npm ERR! peer dep missing: webpack@^3.0.0 || ^4.0.0, required by [email protected]
npm ERR! peer dep missing: gatsby@^2.0.0, required by [email protected]
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]

Steps to reproduce

run npm install -g gatsby-cli on bash
npx gatsby new ...... -------------- if only is given "gatsby new....." command gives bash: gatsby: command not found.

ACER@Acer-SuperMars MINGW64 /d
$ npx gatsby new helloth
info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.git
Cloning into 'helloth'...
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 28 (delta 2), reused 13 (delta 2), pack-reused 0
Receiving objects: 100% (28/28), 613.59 KiB | 520.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.
success Created starter directory layout
info Installing packages...

[email protected] install D:\helloth\node_modules\sharp
(node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached C:\Users\ACER\AppData\Roaming\npm-cache_libvips\libvips-8.9.1-win32-x64.tar.gz
info sharp Creating D:\helloth\node_modules\sharp\build\Release
info sharp Copying DLLs from D:\helloth\node_modules\sharp\vendor\lib to D:\helloth\node_modules\sharp\build\Release

[email protected] postinstall D:\helloth\node_modules@jimp\bmp\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

[email protected] postinstall D:\helloth\node_modules@jimp\core\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\custom\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\gif\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\jpeg\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-blit\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-blur\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-circle\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-color\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-contain\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-cover\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-crop\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-displace\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-dither\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-fisheye\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-flip\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-gaussian\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-invert\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-mask\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-normalize\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-print\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-resize\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-rotate\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-scale\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-shadow\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugin-threshold\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\plugins\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\png\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\tiff\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\types\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules@jimp\utils\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules\core-js-pure
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules\jimp\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

[email protected] postinstall D:\helloth\node_modules\gatsby-telemetry
node src/postinstall.js || true

[email protected] postinstall D:\helloth\node_modules\cwebp-bin
node lib/install.js

√ cwebp pre-build test passed successfully

[email protected] postinstall D:\helloth\node_modules\mozjpeg
node lib/install.js

√ mozjpeg pre-build test passed successfully

[email protected] postinstall D:\helloth\node_modules\pngquant-bin
node lib/install.js

‼ Command failed: D:\helloth\node_modules\pngquant-bin\vendor\pngquant.exe --version

‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at D:\helloth\node_modules\bin-build\node_modules\execa\index.js:231:11
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node lib/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:\Users\ACER\AppData\Roaming\npm-cache_logs\2020-04-20T19_47_06_604Z-debug.log

ERROR

Command failed with exit code 1: npm install

Error: Command failed with exit code 1: npm install

  • error.js:56 makeError
    [8572]/[gatsby]/[execa]/lib/error.js:56:11

  • index.js:114 handlePromise
    [8572]/[gatsby]/[execa]/index.js:114:26

  • task_queues.js:97 processTicksAndRejections
    internal/process/task_queues.js:97:5

Expected result

run gatsby command

Actual result

ran "gatsby develop" command it gave - bash: gatsby: command not found

ran "npm run develop"

ACER@Acer-SuperMars MINGW64 /d/helloth
$ npm run develop

[email protected] develop D:\helloth
gatsby develop

ERROR #10226 CONFIG

Couldn't find the "gatsby-plugin-sharp" plugin declared in "D:\helloth\gatsby-config.js".

Tried looking for a local plugin in D:\helloth\plugins\gatsby-plugin-sharp.

Tried looking for an installed package in the following paths:

  • D:\helloth\node_modules\gatsby\dist\bootstrap\load-themes\node_modules\gatsby-plugin-sharp
  • D:\helloth\node_modules\gatsby\dist\bootstrap\node_modules\gatsby-plugin-sharp
  • D:\helloth\node_modules\gatsby\dist\node_modules\gatsby-plugin-sharp
  • D:\helloth\node_modules\gatsby\node_modules\gatsby-plugin-sharp
  • D:\helloth\node_modules\gatsby-plugin-sharp
  • D:\node_modules\gatsby-plugin-sharp

not finished open and validate gatsby-configs - 0.057s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: gatsby develop
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] develop 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:\Users\ACER\AppData\Roaming\npm-cache_logs\2020-04-20T20_02_47_033Z-debug.log


C:\Users\ACER>gatsby -v
Gatsby CLI version: 2.11.13

C:\Users\ACER>npm -g ls --depth=0
C:\usr\local
`-- [email protected]

npm ERR! error in C:\usr\local\node_modules\gatsby-cli\node_modules\fsevents: ENOENT: no such file or directory, open 'C:\usr\local\node_modules\gatsby-cli\node_modules\fsevents\package.json'
npm ERR! peer dep missing: eslint@>= 4.12.1, required by [email protected]
npm ERR! peer dep missing: webpack@>=2, required by [email protected]
npm ERR! peer dep missing: webpack@^3.0.0 || ^4.0.0, required by [email protected]
npm ERR! peer dep missing: gatsby@^2.0.0, required by babel-plugin-remove-graphql-quer

Environment

System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Binaries:
Node: 12.16.2 - C:\Program Files\nodejs\node.EXE
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0

Run gatsby info --clipboard in your project directory and paste the output here.

@theboyonline theboyonline added the type: bug An issue or pull request relating to a bug in Gatsby label Apr 20, 2020
@LekoArts
Copy link
Contributor

This is a duplicate of #23289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants