-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix Linux installation problem, move fsevents to optional dependencies #22
Fix Linux installation problem, move fsevents to optional dependencies #22
Conversation
@bfalling @iisa @mekarpeles |
Careful with Babel - it seems that none of us really understand it, and there are incompatibilities with what you have to include in what config files (babel.rc and webpack.config) for different versions. I have a complete mess in the IAUX2 branch of dweb-archive and cannot find any combination of babel that will run properly with webpack and also at runtime. On Friday @iisa and I got it compiling with up to date babel, but it complained about a runtime missing - adding the runtime meant it wouldn't compile. |
If you want to try this .... Note - you'll probably need to do cd dweb-mirror && yarn install and also maybe cd dweb-mirror && ./install.sh before webpack-ing. If you figured out how to get this to work it would be huge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyansh23 thanks for the start off this.a couple of questions.
packages/ia-components/package.json
Outdated
@@ -21,9 +21,10 @@ | |||
"@storybook/addon-knobs": "^4.1.4", | |||
"@storybook/react": "^4.1.4", | |||
"assert": "^1.4.1", | |||
"babel-core": "^7.0.0-bridge.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: why are we using babel-core
instead of @babel/core
v. 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already use "@babel/core": "^7.2.2",
at the first line, we should not need the two unless it is for a certain reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iisa
Your concern is valid. I will need to check with docs and babel-upgrade
package which I used for upgrading the version. I will do some research and reply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iisa I think this happened because ia-components/package.json
was already using Babel 7 and babel-upgrade
package which I used was designed to migrate from Babel 6 to Babel 7. So changes in this package.json
were not required. Thanks for reviewing.
I will update the PR.
@iisa I just checked the the babel-upgrade
package's documentation. Please have a look. Ref: https://github.com/babel/babel-upgrade
Relevant Screenshot from the page:
Hence the behavior was intendend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jest JS docs say otherwise. Perhaps upgrade tool is behind. Pleaes double check. https://jestjs.io/docs/en/getting-started
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iisa I again cross-checked.
It is strange but babel-core
is needed in case of jestJS.
Relevant links:
1: jestjs/jest#6913 (comment)
2: jestjs/jest#6662 (comment)
All the the solutions say the same thing, i.e. keep both @babel/core and babel-core in case of jest as a dependency.
So I strongly think that the babel-upgrade
is doing the right thing.
Also if you see link 1, removing babel-core
gives errors.
So concluding on the note that babel-upgrade
is doing the right thing in my opinion.
@mitra42 |
@mitra42 well, technically speaking i understand babel very well. the problem has been more in last ~2y we haven't been as rigorous about testing updates -- IE esp. got a bit tricky some additional polyfill requirements, etc. |
@traceypooh Would you also please review the PR. I think we should leave no stone unturned. |
Glad to hear that @traceypooh, we didn't think to ask you. Even on stackexchange people dont seem to fully understand what versions of what packages are needed for current versions, and the problem seems to be that babel does a crappy job of defining dependencies so if you don't have just the right set it gives incomprehensible error messages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more comments @shreyansh23
packages/ia-components/package.json
Outdated
@@ -21,9 +21,10 @@ | |||
"@storybook/addon-knobs": "^4.1.4", | |||
"@storybook/react": "^4.1.4", | |||
"assert": "^1.4.1", | |||
"babel-core": "^7.0.0-bridge.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jest JS docs say otherwise. Perhaps upgrade tool is behind. Pleaes double check. https://jestjs.io/docs/en/getting-started
packages/ia-components/yarn.lock
Outdated
@@ -2077,6 +2077,11 @@ babel-core@^6.0.0, babel-core@^6.26.0: | |||
slash "^1.0.0" | |||
source-map "^0.5.7" | |||
|
|||
babel-core@^7.0.0-bridge.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please note to update yarn.lock once this is resolved
@@ -4,19 +4,20 @@ | |||
"license": "AGPL-3.0-only", | |||
"private": true, | |||
"dependencies": { | |||
"babel-preset-react": "^6.24.1", | |||
"@babel/core": "^7.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@babel/core has been added twice, here and in devDependencies.
@shreyansh23 hi, can you pull the FSEvents to optional dependency as its own PR? |
dd6115b
to
b2d9f80
Compare
Updating this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Babel upgrade has been moved to a different PR #51 |
Fix issue issue in Linux installation + Migrate to Babel 7 🎉
Related to PR #19
Closes issue #16
fsevents
package.Solution
fsevents
is moved tooptionalDependencies
which is where it should be present.Babel
from version 6 to 7Implementation
Implemenation was done following the steps suggested by https://babeljs.io/docs/en/configuration
n/a
Can be tested by pulling the branch. Then follow the steps suggested in the README.md
Steps: