question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm-related build issue

See original GitHub issue

Description

I’m encountering issues when building jupyterlab-widgets from source. I’m not sure if this is the right repo to report this to, but https://pypi.org/project/jupyterlab-widgets/ lists this as the homepage.

Reproduce

  1. Install all dependencies
  2. Download https://files.pythonhosted.org/packages/27/f1/0d3a09c0069467ed9636faf3a9b5b758378216bb891066a0bc24799681e3/jupyterlab_widgets-1.0.2.tar.gz
  3. Extract the tarball and enter the directory
  4. Run pip install .

It may also be possible to reproduce using pip install --no-binary jupyterlab-widgets but I haven’t tried this yet.

During installation, jupyter-packaging seems to be using npm to download random dependencies from the internet (hopefully verifying those checksums) and fails to install one of them:

  running bdist_wheel
  running jsdeps
  Installing build dependencies with npm.  This may take a while...
  > jlpm install
  yarn install v1.21.1
  info No lockfile found.
  [1/4] Resolving packages...
...
  $ jlpm run clean && jlpm run build:prod
  yarn run v1.21.1
  $ jlpm run clean:lib
  $ rimraf lib tsconfig.tsbuildinfo
  Done in 1.34s.
  yarn run v1.21.1
  $ jlpm run build:lib && jlpm run build:labextension
  $ tsc
  tsconfig.json(2,14): error TS6053: File '../tsconfigbase' not found.
  tsconfig.json(10,5): error TS6053: File '/tmp/adam/spack-stage/spack-stage-py-jupyterlab-widgets-1.0.2-lxlhfv4qa2lkn4sn6sn2odsqgarlp5gd/packages/base' not found.
  tsconfig.json(13,5): error TS6053: File '/tmp/adam/spack-stage/spack-stage-py-jupyterlab-widgets-1.0.2-lxlhfv4qa2lkn4sn6sn2odsqgarlp5gd/packages/controls' not found.
  tsconfig.json(16,5): error TS6053: File '/tmp/adam/spack-stage/spack-stage-py-jupyterlab-widgets-1.0.2-lxlhfv4qa2lkn4sn6sn2odsqgarlp5gd/packages/output' not found.
  error Command failed with exit code 2.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  error Command failed with exit code 2.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  error Command failed with exit code 2.
  info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Expected behavior

I would expect to be able to build jupyterlab-widgets without having to install npm, without npm downloading random dependencies from the internet, and without those npm installations failing.

Context

  • ipywidgets version: jupyterlab-widgets 1.0.2
  • Operating System and version: Ubuntu 18.04
  • Browser and version: N/A

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jasongroutcommented, Dec 22, 2021

It looks like our autodetection of whether the build should happen or not is missing now on master, so it will always try to rebuild the javascript. You see remnants of our crude check here, for example: https://github.com/jupyter-widgets/ipywidgets/blob/045cb0eeb21643373ddbd49a2a12acaad8cbb900/python/jupyterlab_widgets/setup.py#L16 (the build is only supposed to happen if we are in the git repo and we don’t have the necessary source files).

1reaction
vidartfcommented, Dec 20, 2021

@adamjstewart Thanks for clarifying. I’ll try to bring it up during the discussions for the next release, and see what the mood is for/against. That said, we cannot go back and patch this into previous releases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm related tasks are throwing errors during installations
I've been having this problem recently that nothing related to npm is working for me except npm start . npm install is giving...
Read more >
Add node_modules cache to npm related builds - GitLab.org
Allows for caching node_modules/ between builds on npm related builds. Are there points in the code the reviewer needs to double check? Why...
Read more >
Jenkins Build Error - Possibly NPM Related? - The Mail Archive
Hi, We are using the “exec-maven-plugin” with NPM (version 6.4.1) and even though they are both installed and in the $PATH, we are...
Read more >
npm-related - npm
Command-line app for generating a list of links to the homepages of related GitHub/npm projects. Using `helper-related`.. Latest version: 3.0.0, ...
Read more >
npm bin script confusion: Abusing 'bin' to hijack 'node' command
(This nifty feature is used everywhere, from build tools like ... of the issue (arbitrary file overwrites), but not other attack vectors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found