Pnpm and npm fails on install with 404 for 'consty' package

javascript

#1

I’m consistently getting the following error when my app tries to install packages. I am not requiring this package in my package.json so it must be a dependency but I’m not sure for what. I tried running npm ls consty and pnpm ls consty but I think because it’s not actually being installed it can’t tell me where it lives.

The package (consty) is not listed in the npm registry from what I can tell, and it’s very possible this is a typo (?) for the package ‘const’.

Occasionally the install will push through and work, but this has gotten worse the past few days and now will not install no matter how many times I try.

Any help is appreciated! Can post my package.json file contents as well if that’s helpful.

404 Not Found: https://registry.npmjs.org/consty/-/consty-1.1.2.tgz
Error: Promise rejected with value: { code: 'E404',
  uri: 'https://registry.npmjs.org/consty/-/consty-1.1.2.tgz',
  response: 
   { body: 
      { _readableState: [Object],
        readable: true,
        _events: {},
        _eventsCount: 1,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: true,
        _transformState: [Object] },
     size: 0,
     timeout: 0,
     url: 'https://registry.npmjs.org/consty/-/consty-1.1.2.tgz',
     status: 404,
     statusText: 'Not Found',
     headers: {} },
  attempts: 3,
  resource: 'https://registry.npmjs.org/consty/-/consty-1.1.2.tgz',
  message: '404 Not Found: https://registry.npmjs.org/consty/-/consty-1.1.2.tgz' }
    at /opt/nvm/versions/node/v10.15.0/lib/node_modules/pnpm/lib/node_modules/loud-rejection/index.js:27:12
    at Array.forEach (<anonymous>)
    at EventEmitter.<anonymous> (/opt/nvm/versions/node/v10.15.0/lib/node_modules/pnpm/lib/node_modules/loud-rejection/index.js:23:24)
    at EventEmitter.emit (events.js:180:13)
    at emit (/opt/nvm/versions/node/v10.15.0/lib/node_modules/pnpm/lib/node_modules/signal-exit/index.js:77:11)
    at processEmit [as emit] (/opt/nvm/versions/node/v10.15.0/lib/node_modules/pnpm/lib/node_modules/signal-exit/index.js:150:5)
    at process.exit (internal/process.js:140:15)
    at Timeout.setTimeout [as _onTimeout] (/opt/nvm/versions/node/v10.15.0/lib/node_modules/pnpm/lib/err.js:10:30)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)

#2

Hello @esalling23,

I have never seen this error before, so I do not know what may be happening. Can you please try going to your package.json file, and at the top left, you should see “add package” button, could you give this a click, and type in const and click the consty package that shows up and it should install and be added to the package.json file automatically, if this does not work, then let me know!


#3

There is no ‘consty’ package listed, however adding and removing any package seems to have fixed this for now at least.

Thanks for the help! I’m going to keep an eye out for if it pops up again.