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 Cli] Cannot find module 'detect-port' #24589

Closed
MrUltimate opened this issue May 28, 2020 · 4 comments
Closed

[Gatsby Cli] Cannot find module 'detect-port' #24589

MrUltimate opened this issue May 28, 2020 · 4 comments
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@MrUltimate
Copy link
Contributor

MrUltimate commented May 28, 2020

Description

When running any gatsby command, there's a missing modules error under the yoga-layout-prebuilt module.

Steps to reproduce

Run gatsby clean or gatsby develop.

Expected result

Clean cache and start development server

Actual result

Stack Trace:

(base) MacBook-Pro:web $ gatsby develop
/usr/local/lib/node_modules/gatsby-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Cannot find module 'detect-port'
Require stack:
- /usr/local/lib/node_modules/gatsby-cli/lib/recipes.js
- /usr/local/lib/node_modules/gatsby-cli/lib/create-cli.js
- /usr/local/lib/node_modules/gatsby-cli/lib/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/gatsby-cli/lib/recipes.js:18:42)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/gatsby-cli/lib/recipes.js',
    '/usr/local/lib/node_modules/gatsby-cli/lib/create-cli.js',
    '/usr/local/lib/node_modules/gatsby-cli/lib/index.js'
  ]
}

Environment

gatsby info --clipboard does not run.

@MrUltimate MrUltimate added the type: bug An issue or pull request relating to a bug in Gatsby label May 28, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 28, 2020
@lannonbr
Copy link
Contributor

What version of gatsby-cli are you using? This was a previous issue that was solved earlier in #24325 with gatsby-cli@2.12.33

@MrUltimate
Copy link
Contributor Author

MrUltimate commented May 28, 2020

@lannonbr How do I find that out? When I run npm gatsby-cli -v I get 6.14.5

@lannonbr
Copy link
Contributor

Try checking out your package-lock.json or yarn.lock file and search for "gatsby-cli"

@MrUltimate
Copy link
Contributor Author

MrUltimate commented May 28, 2020

Sorry about that. Just went ahead and install that specific version npm install -g gatsby-cli@2.12.33 Things are fine now.

@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 29, 2020
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

3 participants