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 using deprecated @hapi/joi #25764

Closed
hyecheol123 opened this issue Jul 15, 2020 · 22 comments
Closed

Gatsby using deprecated @hapi/joi #25764

hyecheol123 opened this issue Jul 15, 2020 · 22 comments
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: data Relates to source-nodes, internal-data-bridge, and node creation

Comments

@hyecheol123
Copy link

Description

Gatsby is depending on the deprecated dependencies

Steps to reproduce

Install Command as guide in official document

  • npm install -g gatsby-cli

Expected result

Expecting no warnings for deprecated packages, and expected to see clean output with success message

Actual result

npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

Environment

System:
OS: Linux 3.10 Debian GNU/Linux 10 (buster) 10 (buster)
CPU: (8) arm64 unknown
Shell: 5.0.3 - /bin/bash
Binaries:
Node: 14.5.0 - ~/.nvm/versions/node/v14.5.0/bin/node
npm: 6.14.5 - ~/.nvm/versions/node/v14.5.0/bin/npm
npmGlobalPackages:
gatsby-cli: 2.12.60

Other Observation

It also complains that the dependency for acorn-dynamic-import is missing (acorn@^6.0.0).
[ERR MSG]

npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
@hyecheol123 hyecheol123 added the type: bug An issue or pull request relating to a bug in Gatsby label Jul 15, 2020
@LekoArts LekoArts added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 16, 2020
@ascorbic ascorbic changed the title Gatsby using deprecated dependencies Gatsby using deprecated @hapi/joi Jul 16, 2020
@ascorbic ascorbic added help wanted Issue with a clear description that the community can help with. topic: data Relates to source-nodes, internal-data-bridge, and node creation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby labels Jul 16, 2020
@ascorbic
Copy link
Contributor

Thanks for the report. This is because gatsby and gatsby-recipes are using an old version of @hapi/joi for node validation. The newer version is a breaking change, though I don't know if it breaks our schema specifically. If someone wants to take this on, they'd need to look at the changelog for Joi and see if it affects us.

@herecydev
Copy link
Contributor

I'll take a look at this, the changelogs are insanely long so I'll see if it builds first and then go from there

@ascorbic
Copy link
Contributor

Thanks, @herecydev. Much appreciated. If it passes tests, the main issue will be checking for false passes with invalid input.

@herecydev
Copy link
Contributor

Sure I'll see what tests are there and potentially right some further invalid tests

@iAbdullahWaleed
Copy link

Hey Guys, This problem prevent me from downloading gatsby, so there is any solution or I should wait?

@mxstbr
Copy link
Contributor

mxstbr commented Jul 23, 2020

@iAbdullahWaleed deprecated dependencies are warnings when npm installing, not errors, so you should be able to use gatsby anyway? 😊

@iAbdullahWaleed
Copy link

Yes I can, but it's was my first time using the command line, so i was confused when i saw the warnings 🙄.

@mxstbr
Copy link
Contributor

mxstbr commented Jul 23, 2020

Makes a lot of sense, they are really confusing! Hopefully we can get rid of them soon, until then enjoy Gatsby!

@hyecheol123
Copy link
Author

Looks like it is hard to fix this issue, but thanks for all of your hard works and efforts to solve this problem!!
Sorry that I am not able to help the process, as I have no knowledge on Javascript.

@PluckyPrecious
Copy link

Hi @mxstbr it's my first time installing Gatsby too, but after getting the deprecated dependencies warning an error occur without complete installation on windows 10.

npm ERR! Unexpected end of JSON input while parsing near '...+oQAJqigTCokVza05RpiQ'
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2020-07-30T04_28_22_170Z-debug.log

@aminocode0
Copy link

I'm also facing the same issue in my Linux system, please help me to get out from this gatsby error. please help me, anyone

@herecydev
Copy link
Contributor

There's a pr here: #25797

The fix is in progress but it's moving slowly.

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 31, 2020
@LekoArts LekoArts removed the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 31, 2020
@pavan-elisetty
Copy link

same issue , though @mxstbr said these are warnings but we will be able to use gatsby , but i am unable to use gatsby cli
image

@adriatic
Copy link

adriatic commented Oct 4, 2020

This issue is still unresolved (I tripped on it today in a different context, running npm install react-router-dom). Does this mean that that it is the responsibility of the team that maintains the react-router-dom module, or the Gatsby team od Strapi team? Either way why is the process of addressing this issue taking so long?

@herecydev
Copy link
Contributor

@adriatic See this comment: #25797 (comment)

If you can help migrate that file; that will unblock this PR.

@adriatic
Copy link

adriatic commented Oct 4, 2020

I am torn, Dan (@herecydev) by your proposal; encountered this problem doing something very different, so from that point of view the remaining work on this issue is a very low priority for me. On the other hand, probably all people encountering it think the same 😄.

@Code-Tap
Copy link

This still appears to be an issue.
Clean first time install

2020-12-17-063754_1266x344_scrot

@yogoeasy
Copy link

I failed to install Gatsby CLI with npm. Instead, I use yarn to install it successfully.

@mihanizm56
Copy link

mihanizm56 commented Nov 5, 2021

can not build project
"gatsby": "4.1.0",

default cli configuration

node 14.18.1

image

@LekoArts
Copy link
Contributor

LekoArts commented Feb 1, 2022

We still need to do this at some point, we'd be happy to receive a PR updating it. The old PR #25797 got stale so I closed it, but something along those lines should work :)

@LekoArts LekoArts added the status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. label Feb 1, 2022
@marvinjude
Copy link
Contributor

Closing this because it has been addressed in #29792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. topic: data Relates to source-nodes, internal-data-bridge, and node creation
Projects
None yet
Development

Successfully merging a pull request may close this issue.