Skip to content

Commit

Permalink
return a new error instead of using the error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielle Adams committed Jul 7, 2020
1 parent cb9b308 commit 5455e0b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/install/inflate-shrinkwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const childPath = require('../utils/child-path.js')
const createChild = require('./node.js').create
let fetchPackageMetadata
const inflateBundled = require('./inflate-bundled.js')
const errorHandler = require('../utils/error-handler.js')
const moduleName = require('../utils/module-name.js')
const normalizePackageData = require('normalize-package-data')
const npm = require('../npm.js')
Expand Down Expand Up @@ -58,7 +57,7 @@ function inflateShrinkwrap (topPath, tree, swdeps, opts) {
let message = `Object for dependency "${name}" is empty.\n`
message += 'Something went wrong. Regenerate the package-lock.json with "npm install".\n'
message += 'If using a shrinkwrap, regenerate with "npm shrinkwrap".'
return Promise.reject(errorHandler(message))
return Promise.reject(new Error(message))
}

return inflatableChild(
Expand Down

0 comments on commit 5455e0b

Please sign in to comment.