-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Error installing prettier plugin with pre commands #4015
Comments
@bdovaz sorry I'm struggling for days with ApiReporter not working with flavors, and the big mess with docker hub rate limits while building :( |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
I think I can guess what's going on... The default is And I see that although at descriptor level the pre/post are not executed in parallel because that variable is processed later: megalinter/megalinter/MegaLinter.py Line 241 in c2a45f5
megalinter/megalinter/MegaLinter.py Line 252 in c2a45f5
In the case of linters, pre/post commands are executed in parallel: megalinter/megalinter/MegaLinter.py Line 247 in c2a45f5
megalinter/megalinter/Linter.py Line 819 in c2a45f5
megalinter/megalinter/Linter.py Line 874 in c2a45f5
So as in my case I am installing npm packages I might be entering strange thread race conditions, right? |
@bdovaz i think that in that case, you shoukd use the main PRE_COMMANDS to ne sure it is run before Please can you check if it works better like that ? :) |
@nvuillam maybe my message was not clear, disabling the parallel option or putting as you say the commands to the main level works but that limitation we want to leave it like that or solve it? Because now having changed it to main, I am executing those commands ALWAYS, regardless of whether those prettier linters are going to be executed or not. |
Unfortunately, i don't see any other solution, do you ? :/ |
The only thing I can think of is to be configurable if all pre/post command at linter level are executed in parallel or not or even decide per command to have an option for it. |
The problem is that the whole linters are processed in parallel, including their scoped PRE_COMMANDS, and we can't know before if they'll need to be run or not :/ |
But that's what I mean, with a new attribute at the command level to make it more granular or simply at the linter level to be able to decide it and in the code filter out the ones with parallel true or false and process them at the appropriate time. |
he problem is that the "parallel linters chunks" are build according to the descriptor and apply_fixes ,before we check the content of linter pre-commands :/ While it might be technically possible, it would be a huge impact on the architecture, and with my limited time I don't feel confident to start such task with high risks of regressions , while there is the workaround to put the command in main PRE_COMMANDS :/ |
(but if you want to try a PR you can ^^ ) |
Describe the bug
I have been using this plugin for some time: https://www.npmjs.com/package/prettier-plugin-multiline-arrays?activeTab=readme
The problem I have is that it randomly crashes with the following:
Output log
2024-09-18T14:21:01.4521848Z
2024-09-18T14:21:01.4522093Z """
2024-09-18T14:21:01.4522195Z
2024-09-18T14:21:01.4522540Z The above exception was the direct cause of the following exception:
2024-09-18T14:21:01.4522738Z
2024-09-18T14:21:01.4523037Z Traceback (most recent call last):
2024-09-18T14:21:01.4523416Z File "", line 198, in _run_module_as_main
2024-09-18T14:21:01.4523808Z File "", line 88, in _run_code
2024-09-18T14:21:01.4524180Z File "/megalinter/run.py", line 14, in
2024-09-18T14:21:01.4524504Z linter.run()
2024-09-18T14:21:01.4524842Z File "/megalinter/MegaLinter.py", line 243, in run
2024-09-18T14:21:01.4525266Z self.process_linters_parallel(active_linters, linters_do_fixes)
2024-09-18T14:21:01.4525725Z File "/megalinter/MegaLinter.py", line 365, in process_linters_parallel
2024-09-18T14:21:01.4526133Z updated_linters = pool_result.get()
2024-09-18T14:21:01.4526447Z ^^^^^^^^^^^^^^^^^
2024-09-18T14:21:01.4526810Z File "/usr/local/lib/python3.12/multiprocessing/pool.py", line 774, in get
2024-09-18T14:21:01.4527180Z raise self._value
2024-09-18T14:21:01.4527569Z Exception: [Pre][SPELL_CSPELL]: User command failed, stop running MegaLinter
2024-09-18T14:21:01.4528397Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/dist/cjs/augments/string/url.js'
2024-09-18T14:21:01.4529317Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/dist/esm/augments/string/url.js'
2024-09-18T14:21:01.4530328Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/index.js'
2024-09-18T14:21:01.4531305Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/dist/cjs/augments/string/uuid.js'
2024-09-18T14:21:01.4532286Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/dist/esm/augments/string/uuid.js'
2024-09-18T14:21:01.4533146Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@cspell/dict-es-es/package.json'
2024-09-18T14:21:01.4534108Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist'
2024-09-18T14:21:01.4535069Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/dist/cjs/augments/promise/wait.js'
2024-09-18T14:21:01.4535917Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@cspell/dict-es-es/README.md'
2024-09-18T14:21:01.4536957Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/dist/esm/augments/promise/wait.js'
2024-09-18T14:21:01.4538067Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/json-compatible.js'
2024-09-18T14:21:01.4539007Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/@cspell/dict-es-es/src'
2024-09-18T14:21:01.4540187Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/json-compatible.js'
2024-09-18T14:21:01.4541259Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/@augment-vir/common/package.json'
2024-09-18T14:21:01.4542378Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/json.js'
2024-09-18T14:21:01.4543521Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/json.js'
2024-09-18T14:21:01.4544684Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/jsonify.js'
2024-09-18T14:21:01.4545872Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/jsonify.js'
2024-09-18T14:21:01.4547184Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/map-object.js'
2024-09-18T14:21:01.4548336Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/map-object.js'
2024-09-18T14:21:01.4549493Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/merge-deep.js'
2024-09-18T14:21:01.4550658Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/merge-deep.js'
2024-09-18T14:21:01.4552440Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/merge-property-arrays.js'
2024-09-18T14:21:01.4553687Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/merge-property-arrays.js'
2024-09-18T14:21:01.4554869Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/nested-keys.js'
2024-09-18T14:21:01.4556162Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/nested-keys.js'
2024-09-18T14:21:01.4557379Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/object-entries.js'
2024-09-18T14:21:01.4558596Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/object-entries.js'
2024-09-18T14:21:01.4559793Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/object.js'
2024-09-18T14:21:01.4560976Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/object.js'
2024-09-18T14:21:01.4562433Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/old-union-to-intersection.js'
2024-09-18T14:21:01.4563825Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/old-union-to-intersection.js'
2024-09-18T14:21:01.4565046Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/pick-deep.js'
2024-09-18T14:21:01.4566236Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/pick-deep.js'
2024-09-18T14:21:01.4567510Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/string'
2024-09-18T14:21:01.4568621Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/string'
2024-09-18T14:21:01.4569763Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/promise/promise.js'
2024-09-18T14:21:01.4570917Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/promise/promise.js'
2024-09-18T14:21:01.4572104Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/random.js'
2024-09-18T14:21:01.4573258Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/random.js'
2024-09-18T14:21:01.4574392Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/regexp.js'
2024-09-18T14:21:01.4575524Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/regexp.js'
2024-09-18T14:21:01.4576703Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/array/remove-duplicates.js'
2024-09-18T14:21:01.4577924Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/array/remove-duplicates.js'
2024-09-18T14:21:01.4579074Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/string'
2024-09-18T14:21:01.4580193Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/string'
2024-09-18T14:21:01.4581316Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/time.js'
2024-09-18T14:21:01.4582553Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/time.js'
2024-09-18T14:21:01.4583715Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/truncate-number.js'
2024-09-18T14:21:01.4585161Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/truncate-number.js'
2024-09-18T14:21:01.4586303Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/tuple.js'
2024-09-18T14:21:01.4587424Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/tuple.js'
2024-09-18T14:21:01.4588534Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/type.js'
2024-09-18T14:21:01.4589650Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/type.js'
2024-09-18T14:21:01.4590833Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/object/typed-has-property.js'
2024-09-18T14:21:01.4592118Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/object/typed-has-property.js'
2024-09-18T14:21:01.4593270Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/string'
2024-09-18T14:21:01.4594378Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/string'
2024-09-18T14:21:01.4595539Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/promise/wait.js'
2024-09-18T14:21:01.4596700Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/promise/wait.js'
2024-09-18T14:21:01.4597849Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/cjs/augments/wrap-in-try.js'
2024-09-18T14:21:01.4599004Z npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/tmp/lint/node_modules/prettier-plugin-multiline-arrays/node_modules/@augment-vir/common/dist/esm/augments/wrap-in-try.js'
2024-09-18T14:21:01.4599576Z npm error code ENOTEMPTY
2024-09-18T14:21:01.4599896Z npm error syscall rmdir
2024-09-18T14:21:01.4600255Z npm error path /tmp/lint/node_modules/prettier/plugins
2024-09-18T14:21:01.4600615Z npm error errno -39
2024-09-18T14:21:01.4601217Z npm error ENOTEMPTY: directory not empty, rmdir '/tmp/lint/node_modules/prettier/plugins'
2024-09-18T14:21:01.4602075Z npm error A complete log of this run can be found in: /root/.npm/_logs/2024-09-18T14_20_40_948Z-debug-0.log
2024-09-18T14:21:01.4602332Z
2024-09-18T14:21:05.9814000Z
2024-09-18T14:21:05.9866977Z ##[error]PowerShell exited with code '1'.
To Reproduce
Steps to reproduce the behavior:
.mega-linter.yml
.prettierrc.json
The text was updated successfully, but these errors were encountered: