GithubHelp home page GithubHelp logo

Comments (4)

mads-hartmann avatar mads-hartmann commented on August 30, 2024 1

I'll take a look - @andrew-farries I'll reach out it I need help reproducing this ๐Ÿงก

from leeway.

mads-hartmann avatar mads-hartmann commented on August 30, 2024 1

@andrew-farries and I had a look - Leeway can't find mocha because it's not part of the package.json used by the Leeway package. The reason yarn test works if you invoke it directly from the folder is because mocha is present in the top-level node_modules so it's detected and used by yarn - in the Leeway build the top-level node_modules isn't available (as it should be).

The solution is to add mocha as a direct dependency to the package.

@andrew-farries I'm closing this, but I'm happy debugging further tomorrow if needed (we didn't get the tests running - when we added mocha to the package it tried to run the tests build failed for another reason, likely due to other missing dependencies or version-mismatch with the version of mocha we selected)

from leeway.

csweichel avatar csweichel commented on August 30, 2024

The behaviour in the sample case works as designed.
Because there's an install entry in the commands section, leeway executes that command instead of yarn install. Subsequently the dev packages are not installed. Removing the install command fixes the build.

from leeway.

andrew-farries avatar andrew-farries commented on August 30, 2024

Thanks. The example repo wasn't a good reproduction of the problem that exists in the Gitpod repo in that case.

In Gitpod's ws-manager-api/typescript component the BUILD.yaml doesn't override the install entry but leeway is unable to run yarn test when dontTest is set to false:

https://github.com/gitpod-io/gitpod/blob/4c3007af75cbf46dc965e172776995b6e9d8612c/components/ws-manager-api/typescript/BUILD.yaml

The error is the same (can't find mocha), but in that case it looks as though the dev packages should be installed correctly.

from leeway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.