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

@adeira/relay: fetch-schema script should support .babelrc #189

Closed
jaroslav-kubicek opened this issue Nov 27, 2019 · 7 comments
Closed

@adeira/relay: fetch-schema script should support .babelrc #189

jaroslav-kubicek opened this issue Nov 27, 2019 · 7 comments

Comments

@jaroslav-kubicek
Copy link
Contributor

When running adeira-fetch-schema on repository with .babelrc only, it fails to find babel config:

adeira-fetch-schema --resource=https://graphql.kiwi.com
/Users/jaroslavkubicek/projects/nitrolib/node_modules/@babel/core/lib/config/partial.js:50
        throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}"`), {
        ^

Error: Babel was run with rootMode:"upward" but a root could not be found when searching upward from "/Users/jaroslavkubicek/projects/nitrolib"
@mrtnzlml
Copy link
Member

You should upgrade to Babel 7 properly by using project-wide configuration babel.config.js, see: https://babeljs.io/docs/en/config-files#project-wide-configuration

I encountered this issue as well on one project and I am not sure we should modify it in this package (it's simple, we'd have to use root mode upward-optional). It seems like a problem of the project where people ignore the new configuration system for Babel 7.

@jaroslav-kubicek
Copy link
Contributor Author

of course 🙂 possible solution can be also upgrading error message explaining this :)

@mrtnzlml
Copy link
Member

Sure, feel free to send a PR to Babel since this is nothing Universe specific. :)

@jaroslav-kubicek
Copy link
Contributor Author

Closed via babel/babel#10778

@mrtnzlml
Copy link
Member

mrtnzlml commented Dec 1, 2019

Very nice! 👍

mrtnzlml added a commit that referenced this issue Dec 2, 2019
This feature was requested here #189 and was greatly improved in Babel itself here babel/babel#10778. It can however be annoying and sometimes difficult to do such modification so I changed my mind and I'd like to allow it after all. It's because this code where we require "upward" mode is necessary only for Universe development and should not affect users of our NPM package.
@mrtnzlml
Copy link
Member

mrtnzlml commented Dec 2, 2019

This will also be allowed from our side: #203 (if it goes through the review)

It's because the code which is enforcing the "upward" mode is necessary only for Universe development and should not affect our NPM users. So I changed my mind and now I think this issue is very valid.

Thank you for your contribution into Babel itself though - that's really great no matter this change! :)

@mrtnzlml
Copy link
Member

mrtnzlml commented Dec 2, 2019

Side note: I believe it's still valid to use project-wide config for Babel 7+ projects... :)

mrtnzlml added a commit that referenced this issue Dec 2, 2019
This feature was requested here #189 and was greatly improved in Babel itself here babel/babel#10778. It can however be annoying and sometimes difficult to do such modification so I changed my mind and I'd like to allow it after all. It's because this code where we require "upward" mode is necessary only for Universe development and should not affect users of our NPM package.
mrtnzlml added a commit that referenced this issue Dec 2, 2019
This feature was requested here #189 and was greatly improved in Babel itself here babel/babel#10778. It can however be annoying and sometimes difficult to do such modification so I changed my mind and I'd like to allow it after all. It's because this code where we require "upward" mode is necessary only for Universe development and should not affect users of our NPM package.
adeira-github-bot pushed a commit to adeira/relay-example that referenced this issue Dec 14, 2019
This feature was requested here adeira/universe#189 and was greatly improved in Babel itself here babel/babel#10778. It can however be annoying and sometimes difficult to do such modification so I changed my mind and I'd like to allow it after all. It's because this code where we require "upward" mode is necessary only for Universe development and should not affect users of our NPM package.

adeira-source-id: a7917273c3a7861fa3f355e38c9ab732a9b1d150
adeira-github-bot pushed a commit to adeira/relay that referenced this issue Dec 29, 2020
This feature was requested here adeira/universe#189 and was greatly improved in Babel itself here babel/babel#10778. It can however be annoying and sometimes difficult to do such modification so I changed my mind and I'd like to allow it after all. It's because this code where we require "upward" mode is necessary only for Universe development and should not affect users of our NPM package.

adeira-source-id: a7917273c3a7861fa3f355e38c9ab732a9b1d150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants