My nodejs project stopped working

Hi! My project was running fine but now i’m getting this error:

Error: Promise rejected with value: { code: 'E404',

  uri: '',


   { body: 

      { _readableState: [Object],

        readable: true,

        _events: {},

        _eventsCount: 1,

        _writableState: [Object],

        writable: false,

        allowHalfOpen: true,

        _transformState: [Object] },

     size: 0,

     timeout: 0,

     url: '',

     status: 404,

     statusText: 'Not Found',

     headers: {} },

  attempts: 3,

  resource: '',

  message: '404 Not Found:' }

    at /opt/nvm/versions/node/v10.14.1/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.14.1/lib/node_modules/pnpm/lib/node_modules/loud-rejection/index.js:23:24)

    at emitTwo (events.js:126:13)

    at EventEmitter.emit (events.js:214:7)

    at emit (/opt/nvm/versions/node/v10.14.1/lib/node_modules/pnpm/lib/node_modules/signal-exit/index.js:77:11)

    at processEmit [as emit] (/opt/nvm/versions/node/v10.14.1/lib/node_modules/pnpm/lib/node_modules/signal-exit/index.js:150:5)

    at process.exit (internal/process.js:146:15)

    at Timeout.setTimeout [as _onTimeout] (/opt/nvm/versions/node/v10.14.1/lib/node_modules/pnpm/lib/err.js:10:30)

    at ontimeout (timers.js:498:11)


    throw err;

Error: Cannot find module 'discord.js'

    at Function.Module._resolveFilename (module.js:548:15)

    at Function.Module._load (module.js:475:25)

    at Module.require (module.js:597:17)

    at require (internal/module.js:11:18)

at Object.<anonymous> (/app/server.js:1:79)

    at Module._compile (module.js:653:30)

    at Object.Module._extensions..js (module.js:664:10)

    at Module.load (module.js:566:32)

    at tryModuleLoad (module.js:506:12)

    at Function.Module._load (module.js:498:3)

I’ve tried rewinding to no avail. My project ran into a wall for no reason, and it was running fine yesterday

MOD EDIT: code formatting

Try running enable-pnpm in console?

Hey @Carcraftz it looks like the version of har-validator that’s being required has been removed from npm.

Depending on what’s in your dependencies it’s possible that something in your dependency tree is looking for that specific version. If that “Add package” button visible in your package.json file shows that there are updates available, clicking it to install update packages might help.

I tried this, but it didn’t work :confused:

This didn’t work either :frowning_face:

Ok, next thing to try is to check your shrinkwrap.yaml file. Can you execute grep ‘5.1.2’ shrinkwrap.yaml in your project’s console and if it returns a result then run

rm shrinkwrap.yaml

In your console and let us know how that goes?

Why are you deleting shrinkwrap?

shrinkwrap.yaml is like package.lock, and contains static references to specific versions of packages. If it references a version of a package that’s been removed from npm, that dependency will return a 404. A simple way to explain updating it is just to delete it and have pnpm create a new one with updated references.

1 Like