tactica / package-audit

Package audit is a patch management tool for deprecated, outdated and vulnerable dependencies.
MIT License
1 stars 0 forks source link

undefined method `error' for #<Net::HTTPNotFound 404 Not Found #25

Open tacadh opened 1 year ago

tacadh commented 1 year ago

node: 14.20.1 package-audit: 0.4.1

I am getting the following error when running package-audit in the root of a React project.

#<Thread:0x00000001048d7e08 /Users/user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/package-audit-0.4.1/lib/package/audit/npm/npm_meta_data.rb:16 run> terminated with exception (report_on_exception is true):

/Users/user/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/package-audit-0.4.1/lib/package/audit/npm/npm_meta_data.rb:18:in 'block (2 levels) in fetch': undefined method 'error' for #<Net::HTTPNotFound 404 Not Found readbody=true> (NoMethodError)

image
tacadh commented 1 year ago

I believe I have found the root cause of this issue, which is we are including a local file in our package.json file, like so:

"@sheet/core": "file:vendor/sheet-core-1.20220921.1.tgz",

Removing this entry from package.json allows the package-audit script to run successfully.

vkononov commented 11 months ago

@tacadh Could you upload a simplified yarn.lock or package-lock.json that contains @sheet/core?