Cannot find (any) modules

All my node modules can’t be found. If I remove one the next one down gets an error. pnpm is enabled. I have tried to reinstall the modules. I have been getting similar issues frequently but i have been able to fix them. I have also tried a few methods outlined in previous forums posts (none worked). pls help D:

Require stack:
- /app/server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
    at Function.Module._load (internal/modules/cjs/loader.js:526:27)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/app/server.js:14:12)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)```

Maybe try this. It reinstalls all of the modules and inits a package.json.

npm init -y
rm -r /app/node_modules
npm install
1 Like

Thanks! This helped me find the issue - the package I used to search Reddit was deleted.

1 Like

where can i type this things?

What do you mean? If you mean where to run the commands then read this article:

1 Like

can you see my problem

i mentioned myself by mistake, anyway can you see my problem ?

Please don’t ask individual people as they may know the answer to one question, but not the other.