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

Not possible to install Gatsby CLI #39206

Open
2 tasks done
uelibaumgartner opened this issue Jan 4, 2025 · 2 comments
Open
2 tasks done

Not possible to install Gatsby CLI #39206

uelibaumgartner opened this issue Jan 4, 2025 · 2 comments
Labels
status: awaiting author response Additional information has been requested from the author type: bug An issue or pull request relating to a bug in Gatsby

Comments

@uelibaumgartner
Copy link

Preliminary Checks

Description

It's not possible to install Gatsby CLI on the latest node.js LTS version

Reproduction Link

https://thereisnowayicanmakearepoforthistypeoferror.com/senseless-required-field

Steps to Reproduce

  1. Install node.js LTS (v22.12.0)
  2. Run npm install -g gatsby-cli on PowerShell
  3. See error

Expected Result

gatsby-cli is installed successfully

Actual Result

I get the following error when installing gatsby globally:

2218 verbose stack Error: command failed
2218 verbose stack     at promiseSpawn (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:22:22)
2218 verbose stack     at spawnWithShell (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:124:10)
2218 verbose stack     at promiseSpawn (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12)
2218 verbose stack     at runScriptPkg (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:77:13)
2218 verbose stack     at runScript (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:12)
2218 verbose stack     at C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:329:17
2218 verbose stack     at run (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:67:22)
2218 verbose stack     at C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:84:9
2218 verbose stack     at new Promise (<anonymous>)
2218 verbose stack     at callLimit (C:\Users\ubaum\AppData\Roaming\npm\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:35:69)
2219 verbose pkgid [email protected]
2220 error code 1
2221 error path C:\Users\ubaum\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\lmdb
2222 error command failed
2223 error command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build-optional-packages
2224 error node:internal/child_process:420
2224 error     throw new ErrnoException(err, 'spawn');
2224 error     ^
2224 error
2224 error Error: spawn EINVAL
2224 error     at ChildProcess.spawn (node:internal/child_process:420:11)
2224 error     at Object.spawn (node:child_process:753:9)
2224 error     at build (C:\Users\ubaum\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\node-gyp-build-optional-packages\bin.js:29:8)
2224 error     at preinstall (C:\Users\ubaum\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\node-gyp-build-optional-packages\bin.js:38:32)
2224 error     at C:\Users\ubaum\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\node-gyp-build-optional-packages\bin.js:11:7
2224 error     at ChildProcess.exithandler (node:child_process:421:5)
2224 error     at ChildProcess.emit (node:events:524:28)
2224 error     at maybeClose (node:internal/child_process:1101:16)
2224 error     at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
2224 error   errno: -4071,
2224 error   code: 'EINVAL',
2224 error   syscall: 'spawn'
2224 error }
2224 error
2224 error Node.js v22.12.0
2225 silly unfinished npm timer reify 1736005970601
2226 silly unfinished npm timer reify:build 1736005979718
2227 silly unfinished npm timer build 1736005979719
2228 silly unfinished npm timer build:deps 1736005979720
2229 silly unfinished npm timer build:run:install 1736005979764
2230 silly unfinished npm timer build:run:install:node_modules/gatsby-cli/node_modules/lmdb 1736005979765
2231 verbose cwd C:\Users\ubaum
2232 verbose os Windows_NT 10.0.26100
2233 verbose node v22.12.0
2234 verbose npm  v10.8.2
2235 verbose exit 1
2236 verbose code 1

Environment

Since I cannot run gatsby commands due to this bug some manual info collection:

❯ node -v
v22.12.0

❯ npm -v
11.0.0

❯ python --version
Python 3.13.1

OS Name:	Microsoft Windows 11 Home
Version:	10.0.26100 Build 26100
Processor:	Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz, 3417 Mhz, 12 Core(s), 12 Logical Processor(s)

Config Flags

No response

@uelibaumgartner uelibaumgartner added the type: bug An issue or pull request relating to a bug in Gatsby label Jan 4, 2025
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 4, 2025
@serhalp
Copy link
Contributor

serhalp commented Jan 7, 2025

Hi there! Gatsby doesn't support node.js 22 at the moment. Have you tried with 18 or 20? See https://www.gatsbyjs.com/docs/tutorial/getting-started/part-0/#nodejs.

@serhalp serhalp added status: awaiting author response Additional information has been requested from the author and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 7, 2025
@Sembauke
Copy link

Hey @serhalp,

Thank you for this info, do you know which version is supported for Gatsby v4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting author response Additional information has been requested from the author type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants