Glitch asking for package that I'm not requesting

This is whats in the console.

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/.registry.npmjs.org/finalhandler/1.1.2/node_modules/finalhandler/index.js:19:16)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Error: Cannot find module 'statuses'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/.registry.npmjs.org/finalhandler/1.1.2/node_modules/finalhandler/index.js:19:16)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)

This is my package.json

{
  "//1": "describes your app and its dependencies",
  "//2": "https://docs.npmjs.com/files/package.json",
  "//3": "updating this file will download and update your packages",
  "name": "hello-express",
  "version": "0.0.1",
  "description": "A simple Node app built on Express, instantly up and running.",
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "express": "^4.17.1",
    "passport": "^0.4.1",
    "passport-discord": "^0.1.3",
    "mongodb": "^3.5.7",
    "ejs": "^3.1.3",
    "express-session": "^1.17.1",
    "discord.js": "^11.5.1",
    "discord-akairo": "^7.5.6",
    "marked": "^1.1.0",
    "webhook-discord": "^3.6.0",
    "passport-oauth2-refresh": "^2.0.0",
    "connect-mongo": "^3.2.0",
    "hastebin-gen": "^2.0.5",
    "node-fetch": "^2.6.0",
    "@sentry/node": "^5.16.0"
  },
  "engines": {
    "node": "10.x"
  },
  "repository": {
    "url": "https://glitch.com/edit/#!/hello-express"
  },
  "license": "MIT",
  "keywords": [
    "node",
    "glitch",
    "express"
  ]
}

Nowhere does it mention the lib statuses. Anyhow, I went ahead and installed statuses and it started asking for a new lib called unpipe which doesn’t exist.

And everytime I edit package.json, I get hit with

 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/send
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/serve-static
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/setprototypeof
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/snekfetch
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/sparse-bitfield
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/statuses
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/string_decoder
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/supports-color
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/toidentifier
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/tweetnacl
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/type-is
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/uid-safe
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/uid2
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/unpipe
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/util-deprecate
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/utils-merge
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/vary
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/webhook-discord
 WARN  There's a directory in node_modules without package.json: /rbd/pnpm-volume/ffd623fa-fa46-429b-b391-e10957bb5b78/node_modules/ws

If you require a module that ain’t in your package.json, this is the error you should get.

internal/modules/cjs/loader.js:584
    throw err;
    ^
Error: Cannot find module 'express'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/server.js:2:17)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)

Try running npm rebuild

Tried that, doesn’t work.

delete node_modules and reinstall?

Tried that, thought it worked, it didn’t.

Maybe it’s some sort of dependency - one package needs it so it needs to install it

1 Like