-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
test: fix failing path prefix test by updating gatsby/cli version #8362
Conversation
This updates the internal gatsby version in one of the tests (path prefix) so that the `gatsby serve` command now has the option `--prefix-paths` which is required for the test to pass. To the best of my knowledge, the --copy-all behavior of gatsby-dev-cli isn't meaningful here, because it doesn't copy over the .bin executables, so the local package.json versions are still used for some things. Also note, for the chmod change, check out [this test run](https://circleci.com/gh/gatsbyjs/gatsby/1410). I've seen that happen locally after running gatsby-dev-cli, and that's the fix that's worked for me!
|
||
sudo npm install -g gatsby-dev-cli && | ||
|
||
# setting up child integration test link to gatsby packages | ||
cd $SRC_PATH && | ||
yarn && | ||
gatsby-dev --set-path-to-repo $GATSBY_PATH && | ||
gatsby-dev --scan-once --copy-all && # copies _all_ files in gatsby/packages | ||
gatsby-dev --scan-once --copy-all --quiet && # copies _all_ files in gatsby/packages | ||
sudo chmod +x ./node_modules/.bin/gatsby && # this is sometimes necessary to ensure executable |
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.
Note: I should maybe make this change at the gatsby-dev-cli level, instead, but this works for now.
Does anyone else run into this? I can replicate it pretty reliably on my local machine 🙃
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.
huh really? I've never hit that problem — I thought NPM took care of that
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.
Yeah, it's replicated in that test I linked to too to the best of my knowledge. Weird stuff 😱
@@ -5,7 +5,7 @@ | |||
"author": "Kyle Mathews <mathews.kyle@gmail.com>", | |||
"dependencies": { | |||
"cypress": "^3.1.0", | |||
"gatsby": "next", | |||
"gatsby": "^2.0.6", |
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.
This should probably be latest 🙃
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 just hit permission problem with some of my tests, so let's try this out
@pieh sounds good, thanks for the merge! |
…tsbyjs#8362) * test: fix failing path prefix test by updating gatsby/cli version This updates the internal gatsby version in one of the tests (path prefix) so that the `gatsby serve` command now has the option `--prefix-paths` which is required for the test to pass. To the best of my knowledge, the --copy-all behavior of gatsby-dev-cli isn't meaningful here, because it doesn't copy over the .bin executables, so the local package.json versions are still used for some things. Also note, for the chmod change, check out [this test run](https://circleci.com/gh/gatsbyjs/gatsby/1410). I've seen that happen locally after running gatsby-dev-cli, and that's the fix that's worked for me! * ci: don't hardcode gatsby path
This updates the internal gatsby version in one of the tests (path
prefix) so that the
gatsby serve
command now has the option--prefix-paths
which is required for the test to pass. To the best ofmy knowledge, the --copy-all behavior of gatsby-dev-cli isn't meaningful
here, because it doesn't copy over the .bin executables, so the local
package.json versions are still used for some things.
Also note, for the chmod change, check out this test run. I've seen that happen locally after running gatsby-dev-cli, and that's the fix that's worked for me!