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

dependency problem; unable to get test environment working #184

Closed
12 tasks
jccartwright opened this issue Jan 5, 2019 · 7 comments
Closed
12 tasks

dependency problem; unable to get test environment working #184

jccartwright opened this issue Jan 5, 2019 · 7 comments
Labels

Comments

@jccartwright
Copy link

  • System Information

    • Browser type and version
      Chrome 71.0.3578.98
    • OS type and version
      MacOS 10.13.06
    • WINDOWS: be sure to indicate which terminal you're using -- (i.e., cmd.exe, powershell, git- bash, cygwin, Ubuntu via windows subsystem for linux, etc...)
    • Node version
      10.7.0
    • Any error messages that may be in the console where you ran npm start
    • Any error messages in the JS console
  • Describe the bug

  • To Reproduce
    Steps to reproduce the behavior:
  1. git clone https://github.com/mike-works/typescript-fundamentals tscript
  2. cd tscript
  3. yarn
  4. See error:
    yarn install v1.12.3
    [1/4] 🔍 Resolving packages...
    [2/4] 🚚 Fetching packages...
    error https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
  • Expected behavior
    yarn to complete successfully.

  • Screenshots (optional)
    If applicable, add screenshots to help explain your problem.

  • Additional context (optional)
    Add any other context about the problem here.

@the-other-nick-wilson
Copy link

the-other-nick-wilson commented Jan 8, 2019

I'm not sure if this is the best approach, but based on what I found here, I just updated the relevant section in the yarn.lock file to 5.1.3.

So change this:

har-validator@~5.1.0:
  version "5.1.2"
  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz#a3891924f815c88e41c7f31112079cfef5e129e5"
  integrity sha512-OFxb5MZXCUMx43X7O8LK4FKggEQx6yC5QPmOcBnYbJ9UjxEcMcrMbaR0af5HZpqeFopw2GwQRQi34ZXI7YLM5w==
  dependencies:
    ajv "^6.5.5"
    har-schema "^2.0.0"

To this:

har-validator@~5.1.3:
  version "5.1.3"
  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz#a3891924f815c88e41c7f31112079cfef5e129e5"
  integrity sha512-OFxb5MZXCUMx43X7O8LK4FKggEQx6yC5QPmOcBnYbJ9UjxEcMcrMbaR0af5HZpqeFopw2GwQRQi34ZXI7YLM5w==
  dependencies:
    ajv "^6.5.5"
    har-schema "^2.0.0"

And try the yarn install command again and it should work. Basically it appears the har-validator package was tagged under the wrong version.

What I don't know is if I was supposed to update both of those versions, or just the top one. It would be nice to get some confirmation here.

@jccartwright
Copy link
Author

jccartwright commented Jan 8, 2019

thanks for the prompt response. modifying the version does indeed seem to allow yarn to install dependencies correctly.

However, I'm now wondering if the test script is working as expected. For example
cd exercises; npm test color-functions

does not run the tests for "color-functions". It looks to me as if the scripts/test/index.sh should contain
./node_modules/.bin/jest --no-cache --watch $1
rather than
./node_modules/.bin/jest --no-cache --watch $2

@the-other-nick-wilson
Copy link

Hmm, I don't think you need to cd into the exercises directory. Did you try npm test color-functions from the base directory? Do you get an error when trying to run it?

@jccartwright
Copy link
Author

jccartwright commented Jan 8, 2019 via email

@the-other-nick-wilson
Copy link

Weird, I totally see what you mean, but mine works just fine with:

npm test color-functions

Even though my index.sh is:

#!/bin/bash ./node_modules/.bin/jest --no-cache --watch $2

I tried:

npm test junk color-functions

And that still works too.

@mike-north
Copy link
Member

I just updated the lock file, with an upgrade to node-sass.

Before

yarn why har-validator

=> Found "[email protected]"
info Reasons this module exists
   - "node-sass#request" depends on it
   - Hoisted from "node-sass#request#har-validator"

After

yarn why har-validator

=> Found "[email protected]"
info Reasons this module exists
   - "node-sass#request" depends on it
   - Hoisted from "node-sass#request#har-validator"

mike-north pushed a commit that referenced this issue Jan 8, 2019
## [1.0.3](v1.0.2...v1.0.3) (2019-01-08)

### Bug Fixes

* upgrade node-sass ([aeba7b5](aeba7b5)), closes [#184](#184)
@mike-north
Copy link
Member

🎉 This issue has been resolved in version 1.0.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants