-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent npm failures on github workflow docker (TAR_ENTRY_ERROR ENOENT) #200
Comments
I was dealing with a similar issue that might be related: The first time you call
Subsequent attempts to call The way I resolved this was by:
Let me know if this helps! |
* fix: fix error for ci - Downgrade `pre-commit` to 3.5.0 for py3.8 - use fake testing to make `pytest` happy * fix: fix wrong config of `.pre-commit-config.yaml` - do not set `types` for local hook - append `-a` arg to `pre-commit run <hook>` in github ci * fix: by creating hatch env before running pre-commit hooks * fix: disabling 'hatch shell default' in action because it can't work properly * fix: calling pyright-python once before pre-commit to fix `npm ERR! code ENOTEMPTY` Ref: RobertCraigie/pyright-python#200 * ci: adjust `setup-envs` action to cache `default` venv and ignore pyright warning * fix: run `pip install -e . --no-deps` everytime to fix potential issues Ref: pypa/hatch#771
@sebpretzer You are right! Thanks! Refer to: https://stackabuse.com/bytes/fixing-npm-err-code-enotempty-on-npm-install/ My solution is: |
I cannot confirm this works as the issue was very aleatory, but I can see that since the application of this tips, i haven't seen the error again. |
We did come to a rather similar conclusion. We have seemingly permanently remedied this problem by repeatedly calling I should have circled around and closed this issue. |
We have been experiencing intermittent failures when trying to use this packages installation of pyright for a while (across all versions) and wanted to check to see if other people have also experienced this issue and how to address it. I have experienced this problem in multiple repositories in multiple github organizations.
I have searched around and the best that I can tell is that this sort of error happens when running inside a docker container, often on github. I've attempted quite a few remedies including some suggested on other reports around similar issues, but so far have not found any solutions.
Our current work around is to restart any failed jobs manually. This over time has been causing delays in much of our work, particularly for longer jobs that depend on pyright.
Has anyone encountered similar problems and understand how to go about addressing it?
npm ERR! code ENOTEMPTY
npm ERR! syscall rmdir
npm ERR! path /home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/dist/typeshed-fallback/stdlib/unittest
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rmdir '/home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/dist/typeshed-fallback/stdlib/unittest'
npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-08-04T12_00_43_386Z-debug-0.log
WARNING: there is a new pyright version available (v1.1.307 -> v1.1.320).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to
latest
Traceback (most recent call last):
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/bin/pyright", line 8, in
sys.exit(entrypoint())
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/cli.py", line 34, in entrypoint
sys.exit(main(sys.argv[1:]))
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/cli.py", line 19, in main
return run(*args, **kwargs).returncode
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/cli.py", line 25, in run
pkg_dir = install_pyright(args, quiet=None)
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/_utils.py", line 61, in install_pyright
node.run(
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/node.py", line 115, in run
return subprocess.run(node_args, env=env, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/bin/npm', 'install', '[email protected]']' returned non-zero exit status 217.
npm WARN tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/dist/typeshed-fallback/stdlib/collections/abc.pyi'
npm WARN tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/dist/typeshed-fallback/stdlib/curses/ascii.pyi'
... continues in this manner for some time ...
es.pyi'
npm WARN tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/dist/typeshed-fallback/stdlib/_typeshed/wsgi.pyi'
npm WARN tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/dist/typeshed-fallback/stdlib/_typeshed/xml.pyi'
added 1 package, and audited 2 packages in 2s
found 0 vulnerabilities
WARNING: there is a new pyright version available (v1.1.307 -> v1.1.320).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to
latest
Traceback (most recent call last):
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/bin/pyright", line 8, in
sys.exit(entrypoint())
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/cli.py", line 34, in entrypoint
sys.exit(main(sys.argv[1:]))
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/cli.py", line 19, in main
return run(*args, **kwargs).returncode
File "/home/runner/.cache/pypoetry/virtualenvs/trajector-cloud-api-common-HO10pT6J-py3.9/lib/python3.9/site-packages/pyright/cli.py", line 28, in run
raise RuntimeError(f'Expected CLI entrypoint: {script} to exist')
RuntimeError: Expected CLI entrypoint: /home/runner/.cache/pyright-python/1.1.307/node_modules/pyright/index.js to exist
The text was updated successfully, but these errors were encountered: