-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Replace npm with yarn #11332
Replace npm with yarn #11332
Conversation
package.json
Outdated
@@ -5,8 +5,8 @@ | |||
"description": "Fastish HTML", | |||
"main": "index.js", | |||
"engines": { | |||
"node": "^4.7.0", | |||
"npm": "^5.0.0" | |||
"node": ">=4.8.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.
I believe you should remove the engines
section from this file. We specify the node
version that Travis must use via .travis.yml
, and Travis' built in version of yarn
used to work fine as it was.
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.
See travis-ci/travis-ci#4653 (comment) for an explanation of why Travis ignores the versions of node
and npm
specified in package.json
.
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.
No change, Travis still fails on Yarn
@danielrozenberg, looks like the error in your latest commit is due to And as luck would have it, @erwinmombay merged #9775 just after you had removed I encountered a similar version incompatibility in #10671, and at that time, I could get away with it. This time, I'd imagine you'd need to downgrade Dependencies are hard :( |
Update after discussion with the team: Let's move to node 6 on Travis. I'll follow up this PR with one that introduces a check to make sure |
@danielrozenberg FYI, I just tested your PR with node 6, and the yarn install was successful. |
Aren't we forcing everyone to update to node 6 then? If yarn can't build amphtml with node 4.8, then changing the .travis.yml isn't going to be enough |
Yes, everyone should upgrade to node 6. From yesterday's discussion, here's what needs to happen:
|
Done 1 & 2, PTAL |
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.
Thanks for the quick fix!
build-system/SERVING.md
Outdated
- gulp (installed globally) | ||
- java 8 | ||
- yarn 1.0.2+ (see https://yarnpkg.com/) |
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.
nit: Move this up the list, just below node
, to reflect the order in which they are likely to be installed.
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.
Done
|
||
## Steps | ||
```bash | ||
git clone https://github.com/ampproject/amphtml.git | ||
cd amphtml | ||
# Checkout a tag | ||
git checkout 123456789 | ||
npm install | ||
yarn |
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.
Does this need to be yarn install
? Or is yarn
sufficient if there's a yarn.lock
?
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.
"yarn" == "yarn install", regardless of yarn.lock or not
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.
Cool, thanks for checking!
``` | ||
|
||
The preceding command might require elevated privileges using `sudo` on some platforms. | ||
|
||
* In your local repository directory (e.g. `~/src/ampproject/amphtml`), install the packages that AMP uses by running | ||
``` | ||
npm install | ||
yarn |
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.
Same question here, re: yarn
vs. yarn install
.
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.
ACK
… which these will be installed
fyi @dknecht we bumped node requirement to >6 and that |
Partially fixes #11303
Fixes #11278