-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
npm updates fail with "Error processing xyz (NoMethodError)" #4775
Comments
Could it be related to 36dfd7c? |
I'm not fluent in ruby, but I'm wondering whether the issue might be caused by updated_content having the value from updated_package_json_content(file) which might not contain any indentation? |
Could we at least do something like the following as a quick fix? def detect_indentation(json)
indentation = json.scan(/^\s+/).min_by(&:length)
return " " if indentation.nil?
indentation_size = indentation.length
indentation_type = indentation.scan(/\t/).any? ? "\t" : " "
indentation_type * indentation_size
end |
Hi @jlowcs, I think the fix you mentioned in #4775 (comment) is appropriate. I'll work on getting this fixed over the next day and keep you updated on it here. |
We are experiencing the same issue Log:
|
Package ecosystem
npm
Package manager version
npm 8.1.2
Language version
node 16.3.2
Manifest location and content prior to update
dependabot.yml content
Updated dependency
What you expected to see, versus what you actually saw
The following error is encountered 5 times (for packages that need updating), then the script stops and fails.
This only happens on one of our privates repositories. None of our other repositories have that issue.
Native package manager behavior
Everything works as expected.
The text was updated successfully, but these errors were encountered: