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

Fails to fetch a npm dependency referenced by a commit-ish git url #7714

Closed
flowersinthesand opened this issue May 6, 2017 · 2 comments
Closed

Comments

@flowersinthesand
Copy link

I found that after I added a dependency referenced by a commit-ish git url to package.json, cettia/cettia-javascript-client@1d92593#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 (https://travis-ci.org/cettia/cettia-javascript-client/builds/229181060), the build fails.

By inserting npm install script which installs such dependencies to before_script section in .travis.yml, I managed to circumvent this issue for now, cettia/cettia-javascript-client@0732fa7 (https://travis-ci.org/cettia/cettia-javascript-client/builds/229448334)

diff --git a/.travis.yml b/.travis.yml
index 6b41506..ed20c9c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,3 +6,5 @@ node_js:
   - 7
 before_script:
   - npm install -g grunt-cli
+  - npm i cettia/cettia-protocol#f83e99cdc202b4818c2041b1563ee8a6ac8c8f00
+
@BanzaiMan
Copy link
Contributor

BanzaiMan commented May 7, 2017

Because your repository has package.json and yarn.lock files, we use yarn as the install step. In your yarn.lock, I see that `cttia/cettia-javascript-client is locked at commit db295015.

If you want to use npm install in spite of the presence of yarn.lock, you would need to override the default:

install:
  - npm install

Or, you can re-lock the dependencies with yarn and commit yarn.lock.

@flowersinthesand
Copy link
Author

Ah thanks! I missed it.

Sorry for the false alarm.

flowersinthesand referenced this issue in cettia/cettia-javascript-client May 8, 2017
Travis CI seems to fail to fetch a dependency referenced by a commit-ish git url.
https://travis-ci.org/cettia/cettia-javascript-client/builds/229181060

By inserting npm install script which installs such dependencies to before_script section in .travis.yml, we can circumvent this issue for now.
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