GithubHelp home page GithubHelp logo

Comments (12)

martinRenou avatar martinRenou commented on June 6, 2024 1

Can you try again and making sure nodejs and yarn are installed this time? Also you may need to make sure to use JupyterLab 3 in your dev setup while #417 is not finished

from ipydatagrid.

jgunstone avatar jgunstone commented on June 6, 2024 1

mamba create -n ipydatagrid-dev ipywidgets=8 jupyterlab nodejs
worked

i guess it failed here:
mamba create -n ipydatagrid-dev ipywidgets=8 jupyterlab
because it defaulted to an old node version on my os

thanks both

from ipydatagrid.

alphaparrot avatar alphaparrot commented on June 6, 2024

I'm running into the same problem; yarn and nodejs are both installed with the most recent versions, and I'm using JupyterLab 3 in my dev setup. It's possible the root error is not related to hatchling (and is simply triggering this particular exception); I get a different error related to js/datagrid.ts and js/plugin.ts after upgrading nodejs to the most recent version:

  js/datagrid.ts(525,35): error TS2345: Argument of type 'FeatherGrid' is not assignable to parameter of type 'Widget'.
    The types of 'title.owner.layout' are incompatible between these types.
      Type 'import("/home/ubuntu/ipydatagrid-dev/node_modules/@lumino/widgets/types/layout").Layout | null' is not assignable to type 'import("/home/ubuntu/ipydatagrid-dev/node_modules/@jupyter-widgets/base/node_modules/@lumino/widgets/types/layout").Layout | null'.
        Property '[Symbol.iterator]' is missing in type 'import("/home/ubuntu/ipydatagrid-dev/node_modules/@lumino/widgets/types/layout").Layout' but required in type 'import("/home/ubuntu/ipydatagrid-dev/node_modules/@jupyter-widgets/base/node_modules/@lumino/widgets/types/layout").Layout'.
  js/plugin.ts(23,14): error TS2322: Type 'Token<IJupyterWidgetRegistry>' is not assignable to type 'Token<any>'.
    Types have separate declarations of a private property '_tokenStructuralPropertyT'.
  Traceback (most recent call last):
    File "/home/ubuntu/ipydatagrid-dev/ipydg-env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 167, in prepare_metadata_for_build_editable
      hook = backend.prepare_metadata_for_build_editable
  AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'

from ipydatagrid.

alphaparrot avatar alphaparrot commented on June 6, 2024

Another possible clue: it may be that some of the nodejs dependencies are incorrect:

  ➤ YN0000: ┌ Resolution step
  ➤ YN0002: │ @jupyterlab/apputils@npm:3.6.5 doesn't provide crypto (p168f6), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/coreutils@npm:5.6.5 doesn't provide crypto (p5981e), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/nbformat@npm:3.6.5 doesn't provide crypto (p9afaf), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/observables@npm:4.6.5 doesn't provide crypto (p81572), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/services@npm:6.6.5 doesn't provide crypto (p86c12), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/services@npm:7.0.5 doesn't provide react (p4d970), requested by @jupyterlab/settingregistry
  ➤ YN0002: │ @jupyterlab/settingregistry@npm:3.6.5 doesn't provide crypto (p29a2a), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/statedb@npm:3.6.5 doesn't provide crypto (p76c48), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/translation@npm:3.6.5 doesn't provide crypto (pedca7), requested by @lumino/coreutils
  ➤ YN0002: │ @jupyterlab/ui-components@npm:3.6.5 [225ad] doesn't provide crypto (p99620), requested by @lumino/coreutils
  ➤ YN0002: │ @lumino/application@npm:1.31.4 doesn't provide crypto (pb2012), requested by @lumino/coreutils
  ➤ YN0002: │ @lumino/commands@npm:1.21.1 doesn't provide crypto (pa4fb2), requested by @lumino/coreutils
  ➤ YN0002: │ @lumino/datagrid@npm:0.36.9 doesn't provide crypto (pba09e), requested by @lumino/coreutils
  ➤ YN0002: │ @lumino/dragdrop@npm:1.14.5 doesn't provide crypto (p0bd32), requested by @lumino/coreutils
  ➤ YN0002: │ @lumino/polling@npm:1.11.4 doesn't provide crypto (pf3e88), requested by @lumino/coreutils
  ➤ YN0002: │ @lumino/widgets@npm:1.37.2 doesn't provide crypto (p092fb), requested by @lumino/coreutils
  ➤ YN0002: │ ipydatagrid@workspace:. doesn't provide crypto (p6d0e9), requested by @lumino/coreutils
  ➤ YN0060: │ ipydatagrid@workspace:. provides typescript (pde841) with version 4.2.4, which doesn't satisfy what ts-jest requests
  ➤ YN0002: │ svg-url-loader@npm:3.0.3 doesn't provide webpack (p260b6), requested by file-loader
  ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
  ➤ YN0000: └ Completed in 0s 380ms
  ➤ YN0000: ┌ Fetch step
  ➤ YN0000: └ Completed in 0s 547ms
  ➤ YN0000: ┌ Link step
  ➤ YN0000: └ Completed in 0s 670ms
  ➤ YN0000: Done with warnings in 1s 705ms

crypto as far as I'm aware ought to be a built-in now

from ipydatagrid.

martinRenou avatar martinRenou commented on June 6, 2024

I believe this is fixed by #417

from ipydatagrid.

jgunstone avatar jgunstone commented on June 6, 2024

just tried this again with a new env and got the same error -

image

AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'

@ollyhensby also tried and got the same error

from ipydatagrid.

ollyhensby avatar ollyhensby commented on June 6, 2024

Looks like it fails when it tries to run jlpm install.

For me it is returning:

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'worker_threads'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at /home/jovyan/mambaforge/envs/ipydatagrid-dev/lib/python3.11/site-packages/jupyterlab/staging/yarn.js:423:2576
    at Object.<anonymous> (/home/jovyan/mambaforge/envs/ipydatagrid-dev/lib/python3.11/site-packages/jupyterlab/staging/yarn.js:743:8770)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

I've tried updating nodejs and npm but still no luck.

nodejs version: v10.19.0
npm version: 6.14.4

from ipydatagrid.

martinRenou avatar martinRenou commented on June 6, 2024

I've tried updating nodejs and npm but still no luck

Which nodejs version have you tried when trying to update. v10 for nodejs looks quite old, I personally use v18 on my dev setup for ipydatagrid.

from ipydatagrid.

ollyhensby avatar ollyhensby commented on June 6, 2024

I've tried updating nodejs and npm but still no luck

Which nodejs version have you tried when trying to update. v10 for nodejs looks quite old, I personally use v18 on my dev setup for ipydatagrid.

Hi Martin, yeah it looks like an issue with nodejs. sudo apt upgrade nodejs seems to only go up to v10.19. I will see how to upgrade to a later version and try the dev install again.

from ipydatagrid.

ollyhensby avatar ollyhensby commented on June 6, 2024

I followed https://github.com/nodesource/distributions#installation-instructions and have upgraded nodejs to v20.7.0.

jlpm install runs successfully now.

from ipydatagrid.

martinRenou avatar martinRenou commented on June 6, 2024

Nice! Alternatively, note that you can also install nodejs from conda-forge with mamba/conda/micromamba install -c conda-forge nodejs

from ipydatagrid.

ollyhensby avatar ollyhensby commented on June 6, 2024

Nice! Alternatively, note that you can also install nodejs from conda-forge with mamba/conda/micromamba install -c conda-forge nodejs

Great! Thank you for the help

from ipydatagrid.

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.