Coder Social home page Coder Social logo

Comments (9)

climbfuji avatar climbfuji commented on May 28, 2024 1

Thanks for your help. Let's keep this open for now. I've got a release to roll out where I am using my duct-tape solution to get it done. After that I'll fix it properly and submit a PR to spack develop.

from spack.

climbfuji avatar climbfuji commented on May 28, 2024

@adamjstewart One workaround I found was to install node.js manually outside of spack with the correct gcc compiler loaded. That was surprisingly simple and allowed the build to proceed (just make sure the spack compiler config loads the node.js module).

from spack.

adamjstewart avatar adamjstewart commented on May 28, 2024

Should we add node.js as a dependency? Does that fix the issue?

from spack.

climbfuji avatar climbfuji commented on May 28, 2024

Should we add node.js as a dependency? Does that fix the issue?

I assume this will work. My quick-and-dirty approach was to simply add the node.js paths into the compiler config on the system. I was a bit hesitant making it a dependency because node.js doesn't build out of the box in spack (where I tried it), but of course an external package should do.

from spack.

adamjstewart avatar adamjstewart commented on May 28, 2024

Hmm, I'm able to build py-jupyter-server 2.6.0 and 1.21.0 without node/npm, so we definitely don't want to make it a required dep. Maybe it's only used if it's found? Do you have the same issue with py-jupyter-server 2.6.0?

from spack.

climbfuji avatar climbfuji commented on May 28, 2024

No, 2.6.0 builds fine. The package I am after py-cylc-uiserver has a constraint on py-jupyter-server<2 in the package config. I removed that for testing if py-cylc-uiserver worked fine with [email protected], but unfortunately it didn't.

from spack.

adamjstewart avatar adamjstewart commented on May 28, 2024

Looks like that constraint was dropped in py-cylc-uiserver 1.4 if you want to update that recipe.

from spack.

adamjstewart avatar adamjstewart commented on May 28, 2024

The best alternative is to patch out whatever calls node in jupyter-server 1

from spack.

climbfuji avatar climbfuji commented on May 28, 2024

@adamjstewart I finally took the time to sort this out. The story behind this is: py-jupyter-server@:1 uses py-jupyter-packaging as build tool (v2 uses something else).

There is an optional feature to build the typescript extension when npm is found, but unfortunately this is all hardcoded to be auto-detected in the py-jupyter-server build and the underlying py-jupyter-packaging tool. The CLI of py-jupyter-packaging provides an option to skip npm, but this is not available when you import the Python modules as py-jupyter-server does.

I found a way around this, which is to add a variant typescript that is False by default. For ~typescript, I am patching (hacking?) pyproject.toml to pass a nonsense build argument npm=/dev/null to the npm_builder, which means it can't find it and gives up. For +typescript, I am adding the npm dependency explicitly to the package.

I tested both installs +/~typescript on the two systems that had errors with py-jupyter-server (the error that lead to the creation of this issue, and also a weird macOS where npm was found, but node was not), and they all worked.

This is all in PR #43279

from spack.

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.