Coder Social home page Coder Social logo

Comments (8)

liudonghua123 avatar liudonghua123 commented on July 27, 2024

It seemed the problem was the binary name of yarn, If I change all yarn with yarn.cmd, then it was ok.

Another method to fix is change shell=False to shell=True in U.do.CmdAction.

from jupyterlite.

bollwyvl avatar bollwyvl commented on July 27, 2024

Not shell=True, please, but the yarn issue is real, and an oversight on my part.

The preferred fix would be:

class P:
    YARN = Path(shutil.which("yarn") or shutil.which("yarn.exe") or shutil.which("yarn.cmd"))

and use P.YARN throughout.

Note, you may well run into other issues further down the build chain, as node on windows is always... interesting.

from jupyterlite.

liudonghua123 avatar liudonghua123 commented on July 27, 2024

@bollwyvl, Hi, Why not shell=True, I think it is cleaner, safe, and works as expected in my opinion. I remembered that I sent a similar pr in dart language. see https://github.com/google/grinder.dart/pull/374/files.

from jupyterlite.

bollwyvl avatar bollwyvl commented on July 27, 2024

from jupyterlite.

liudonghua123 avatar liudonghua123 commented on July 27, 2024

Maybe we can add some tests to guarantee shell=True works in windows. I used a lot of cross-platform commands in the default shell, and most of the time, it is ok.
However, both methods have advantages and disadvantages. It is worth using a simple method in the current project.

from jupyterlite.

bollwyvl avatar bollwyvl commented on July 27, 2024

Feel free to try out https://github.com/jtpio/jupyterlite/pull/69 which adds the which and path normalizing (for case-sensitive windows systems like some network drives), etc. to do.

Given shell has a Special Considerations section in its official docs, I don't really want to propagate it at the bottom of a build/packaging stack.

Representing Jupyter, we maintain a couple dozen packages and do packaging chores for a couple hundred to keep them all running. Given that visibility, even using approaches that have proven problematic, even once, to users is something we try to avoid. Just hadn't gotten around to firming this flow up for the cross-platform case, as it hasn't even really launched yet, and definitely appreciate bringing it to our attention. 👍

from jupyterlite.

jtpio avatar jtpio commented on July 27, 2024

Thanks @liudonghua123 for reporting, and for the PR!

#69 has been merged, if you want to check it out from main directly.

from jupyterlite.

liudonghua123 avatar liudonghua123 commented on July 27, 2024

Thanks @liudonghua123 for reporting, and for the PR!

#69 has been merged, if you want to check it out from main directly.

Thanks 😄

from jupyterlite.

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.