npm-related build issue
See original GitHub issueDescription
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
- Install all dependencies
- Download https://files.pythonhosted.org/packages/27/f1/0d3a09c0069467ed9636faf3a9b5b758378216bb891066a0bc24799681e3/jupyterlab_widgets-1.0.2.tar.gz
- Extract the tarball and enter the directory
- 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:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).
@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.