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 develop crashes with latest versions of Gatsby and gatsby-cli #25466

Closed
OPerel opened this issue Jul 2, 2020 · 24 comments
Closed

gatsby develop crashes with latest versions of Gatsby and gatsby-cli #25466

OPerel opened this issue Jul 2, 2020 · 24 comments
Labels
status: duplicate This is duplicated by another issue or PR already submitted type: bug An issue or pull request relating to a bug in Gatsby

Comments

@OPerel
Copy link

OPerel commented Jul 2, 2020

Description

Running gatsby develop isn't working with latest versions of Gatsby and the cli.
I know there's already a lot of issues similar to this one (e.g #23214, #24577, #24589, #24325, #24411, #24577 and more...), but none of them describes my issue and I couldn't find a solution in any of them.

When running gatsby develop (npm run develop) I get this error:

> gatsby-starter-default@0.1.0 develop C:\Users\Ori\code\new_agra_site
> gatsby develop

C:\Users\Ori\code\new_agra_site\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
        throw ex;
        ^

Error: spawn node ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn node',
  path: 'node',
  spawnargs: [
    'C:\\Users\\Ori\\code\\new_agra_site\\.cache\\tmp-13908-khO9CcGjekXB'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! gatsby-starter-default@0.1.0 develop: `gatsby develop`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the gatsby-starter-default@0.1.0 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\Ori\AppData\Roaming\npm-cache\_logs\2020-07-02T08_18_45_906Z-debug.log

I tried some things like running npm install and npm update. I also tried removing the local installation of the cli and installing it globally (as recommended in one of the issues mentioned above), but got the same result.

Steps to reproduce

Run gatsby develop with versions:

"gatsby": "^2.23.14",
"gatsby-cli": "^2.12.54",

Or checkout the repo here (staging branch).

Expected result

The development server is supposed to run locally.

Actual result

I get the error copied above.

Environment

System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Binaries:
Node: 12.16.0 - C:\Program Files\nodejs\node.EXE
npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.17 - C:\Python27\python.EXE
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.23.14 => 2.23.14
gatsby-background-image: ^0.7.6 => 0.7.6
gatsby-cli: ^2.12.54 => 2.12.54
gatsby-image: ^2.4.11 => 2.4.11
gatsby-plugin-advanced-sitemap: ^1.5.5 => 1.5.5
gatsby-plugin-manifest: ^2.4.16 => 2.4.16
gatsby-plugin-offline: ^2.2.10 => 2.2.10
gatsby-plugin-react-helmet: ^3.3.8 => 3.3.8
gatsby-plugin-sharp: ^2.6.16 => 2.6.16
gatsby-source-filesystem: ^2.0.37 => 2.3.16
gatsby-source-wordpress: ^3.3.17 => 3.3.17
gatsby-transformer-sharp: ^2.5.9 => 2.5.9

Thanks a lot!!

@OPerel OPerel added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 2, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 2, 2020
@OPerel OPerel changed the title gatsby develop crashes with latest vesions on gatsby and gatsby-cli gatsby develop crashes with latest versions of Gatsby and gatsby-cli Jul 2, 2020
@wardpeet
Copy link
Contributor

wardpeet commented Jul 2, 2020

Hey! Could you try and run npm dedupe just to see if it resolves your issue?

If not, yarn should fix it. We'll try to prioritize this fix.

@wardpeet wardpeet added status: duplicate This is duplicated by another issue or PR already submitted and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 2, 2020
@OPerel
Copy link
Author

OPerel commented Jul 2, 2020

Hey! Thanks for the quick response.
I'm getting the same result after running npm dedupe...

Maybe it's worth mentioning that I also get an NPM vulnerability report with 922 vulnerabilities, all of them are caused by lodash. Don't know if that's got anything to do with it.

Thanks again!

@wardpeet
Copy link
Contributor

wardpeet commented Jul 2, 2020

Could you run this CI=1 gatsby build or CI=1 npm run build just to narrow down the issue. If you're on windows you'll probably want to use cross-env

@OPerel
Copy link
Author

OPerel commented Jul 2, 2020

I already tried it before, npm run build works as expected.
Not sure what CI=1 is for, but I just ran set "CI=1" && npm run build and everything works fine (I am on windows and didn't use cross-env).

@sameersegal
Copy link

sameersegal commented Jul 2, 2020

I am getting a similar/related error in my local as well as netlify's build process.

I did try npm dedupe and CI=1 gatsby build but that didn't work for me.

Error

success write out requires - 0.039s
success Building production JavaScript and CSS bundles - 22.188s
/usr/local/lib/node_modules/gatsby/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Cannot find module 'core-js/fn/object/assign'
Require stack:
- /Users/Sameer/Documents/Code/gatsby-starter-novela/node_modules/gatsby/dist/utils/webpack.config.js
- /Users/Sameer/Documents/Code/gatsby-starter-novela/node_modules/gatsby/dist/commands/build-html.js
- /Users/Sameer/Documents/Code/gatsby-starter-novela/node_modules/gatsby/dist/commands/build.js
- /usr/local/lib/node_modules/gatsby/node_modules/gatsby-cli/lib/create-cli.js
- /usr/local/lib/node_modules/gatsby/node_modules/gatsby-cli/lib/index.js
- /usr/local/lib/node_modules/gatsby/dist/bin/gatsby.js
- /usr/local/lib/node_modules/gatsby/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)

Repository: https://github.com/sameersegal/vsb20

Environment


  System:
    OS: macOS 10.15.4
    CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
    Shell: 3.0.2 - /usr/local/bin/fish
  Binaries:
    Node: 14.1.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 83.0.4103.116
    Safari: 13.1
  npmPackages:
    gatsby: ^2.13.41 => 2.23.14 
    gatsby-plugin-manifest: ^2.2.4 => 2.4.16 
    gatsby-plugin-netlify-cms: ^4.1.40 => 4.3.9 
  npmGlobalPackages:
    gatsby: 2.23.11

@riccardolardi
Copy link

riccardolardi commented Jul 2, 2020

Not sure if this is related but I'm getting an error: npm ERR! notarget No matching version found for babel-plugin-remove-graphql-queries@^2.9.10

It seems babel-plugin-remove-graphql-queries was updated a few hours ago but the update hasn't propagated to NPM yet since there the latest version is still tagged with 2.9.9.

@samuelgoddard
Copy link
Contributor

Also getting the npm ERR! notarget No matching version found for babel-plugin-remove-graphql-queries@^2.9.10 error when trying to run npm install - also appears to be broken across all my Gatsby based Netlify builds :( - getting a few different errors but the main one seems to be the above and error Couldn't find any versions for "babel-plugin-remove-graphql-queries" that matches "^2.9.10"

@zhenwan
Copy link

zhenwan commented Jul 2, 2020

same here:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for babel-plugin-remove-graphql-queries@^2.9.10.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'gatsby'

@tomthornton
Copy link

Same here, same error

@riccardolardi
Copy link

riccardolardi commented Jul 2, 2020

https://www.npmjs.com/package/babel-plugin-remove-graphql-queries just now updated to 2.9.11. Seems to work now. Must have been NPM propagation delay.

@ascorbic
Copy link
Contributor

ascorbic commented Jul 2, 2020

@riccardolardi @tomthornton @zhenwan @samuelgoddard The babel plugin issue is different, and should now be fixed. See #25475

@spences10
Copy link
Contributor

This is working for me now on the last update of the Gatby mono-repo

@Szegerege12
Copy link

Got same issue on
"gatsby": "2.19.24", "gatsby-cli": "2.12.35",

Any ways to fix? Gatsby build works only local.

@tomthornton
Copy link

@riccardolardi @tomthornton @zhenwan @samuelgoddard The babel plugin issue is different, and should now be fixed. See #25475

It’s working for me now 👍

@sameersegal
Copy link

For me too!

@samuelgoddard
Copy link
Contributor

Fixed :) Thanks all

@wardpeet
Copy link
Contributor

wardpeet commented Jul 3, 2020

We reverted some changes :) Thank you!

@wardpeet wardpeet closed this as completed Jul 3, 2020
@OPerel
Copy link
Author

OPerel commented Jul 4, 2020

So... after the non-related issue has been resolved, any news on this issue?

@OPerel
Copy link
Author

OPerel commented Jul 5, 2020

Hey @wardpeet the original issue that I raised is not solved. Why did you close this?

@elton2302
Copy link

any updates on this issue....im having the similiar issue

@marharyta
Copy link

Same issue here, any way to exclude /yoga-layout-prebuilt?

@WFROTAN
Copy link

WFROTAN commented Mar 10, 2021

Same issue here, any way to exclude /yoga-layout-prebuilt?

@marharyta @elton2302 you guys end up figuring out a solution? I have been stuck on this for the past 2 days.

@MDOR
Copy link

MDOR commented Mar 19, 2021

Hello,
I've been dealing with a similar situation for a couple of days.
It works for development, but not while running build

Here the details:

  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.5.0 - ~/.nvm/versions/node/v14.5.0/bin/node
    Yarn: 2.4.1 - ~/Projects/project/node_modules/.bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.5.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 89.0.4389.90
    Edge: 89.0.774.54
    Firefox: 85.0.2
    Safari: 14.0.3
    "gatsby": "^2.25.0",
    "gatsby-cli": "^2.18.0",
    "gatsby-image": "^2.10.0",
    "gatsby-plugin-canonical-urls": "^3.0.0",
    "gatsby-plugin-catch-links": "^2.9.0",
    "gatsby-plugin-create-client-paths": "^2.9.0",
    "gatsby-plugin-favicons": "^2.0.0",
    "gatsby-plugin-feed": "^2.12.0",
    "gatsby-plugin-google-analytics": "^2.10.0",
    "gatsby-plugin-layout": "^1.9.0",
    "gatsby-plugin-less": "^4.6.0",
    "gatsby-plugin-lodash": "^3.9.0",
    "gatsby-plugin-manifest": "^2.11.0",
    "gatsby-plugin-no-sourcemaps": "^2.8.0",
    "gatsby-plugin-nprogress": "^2.9.0",
    "gatsby-plugin-offline": "^3.9.0",
    "gatsby-plugin-postcss": "^3.6.0",
    "gatsby-plugin-react-helmet": "^3.9.0",
    "gatsby-plugin-remove-trailing-slashes": "^2.9.0",
    "gatsby-plugin-sass": "^3.1.0",
    "gatsby-plugin-sharp": "^2.13.4",
    "gatsby-plugin-sitemap": "^2.11.0",
    "gatsby-plugin-split-css": "^1.0.2",
    "gatsby-plugin-twitter": "^2.9.0",
    "gatsby-plugin-typescript": "^2.11.0",
    "gatsby-plugin-typescript-checker": "^1.1.1",
    "gatsby-remark-autolink-headers": "^2.10.0",
    "gatsby-remark-copy-linked-files": "^2.9.0",
    "gatsby-remark-images": "^3.10.0",
    "gatsby-remark-prismjs": "^3.12.0",
    "gatsby-remark-responsive-iframe": "^2.10.0",
    "gatsby-source-filesystem": "^2.10.0",
    "gatsby-transformer-remark": "^2.15.0",
    "gatsby-transformer-sharp": "^2.11.0",

It throws this specific exception:

 yarn workspace @namespace/ui build:prod
success open and validate gatsby-configs - 4.742s
success load plugins - 1.291s
success onPreInit - 0.037s
success delete html and css files from previous builds - 0.009s
success initialize cache - 0.014s
success copy gatsby files - 0.063s
success onPreBootstrap - 0.016s
success createSchemaCustomization - 0.003s
success Checking for changed pages - 0.000s
success source and transform nodes - 1.193s
success building schema - 0.386s
info Total nodes: 435, SitePage nodes: 1 (use --verbose for breakdown)
success createPages - 0.002s
success Checking for changed pages - 0.000s
success createPagesStatefully - 0.111s
success Cleaning up stale page-data - 0.002s
success update schema - 0.035s
success onPreExtractQueries - 0.001s
success extract queries from components - 3.571s
success write out redirect data - 0.123s
success Build manifest and related icons - 0.002s
success onPostBootstrap - 0.005s
info bootstrap finished - 16.547s
success run page queries - 0.016s - 10/10 616.39/s
success write out requires - 0.005s
/Users/mdor/Projects/project/frontend/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)
    at EntryDependency.set (/Users/mdor/Projects/project/frontend/node_modules/webpack/lib/Dependency.js:237:9)
    at /Users/mdor/Projects/project/frontend/node_modules/gatsby/node_modules/webpack/lib/Compilation.js:1090:24
    at /Users/mdor/Projects/project/frontend/node_modules/gatsby/node_modules/webpack/lib/NormalModuleFactory.js:409:6
    at /Users/mdor/Projects/project/frontend/node_modules/gatsby/node_modules/webpack/lib/NormalModuleFactory.js:155:13
    at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (/Users/mdor/Projects/project/frontend/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:1)
    at AsyncSeriesWaterfallHook.lazyCompileHook (/Users/mdor/Projects/project/frontend/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/mdor/Projects/project/frontend/node_modules/gatsby/node_modules/webpack/lib/NormalModuleFactory.js:138:29
    at /Users/mdor/Projects/project/frontend/node_modules/gatsby/node_modules/webpack/lib/NormalModuleFactory.js:346:9
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

@jilldianek
Copy link

Im also getting the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate This is duplicated by another issue or PR already submitted type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests