Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

295
Visualizações
Node Cannot find module 'D:\Education\nodemon\bin\nodemon.js'
  • I am a beginner in NodeJS

  • Environment is Windows 11 64 Bit.

  • Node and Nodemon (Globally too) and NPM are installed and working.

    Now when I run the command

    npm run server

It gives the following error

> devconnector@1.0.0 server
> nodemon server

'MongoDB' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'D:\Education\nodemon\bin\nodemon.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Its looking in the wrong folder for the nodemon files. When I pasted the files there it worked fine but I want to change the folder it searches for those files in.

Here is my server.js file

const express = require("express");

const app = express();

app.get("/", (req, res) => res.send("API Running"));

const PORT = process.env.PORT || 5000;

app.listen(PORT, () => console.log(`Server started on port ${PORT}`));

And my package.json file

{
    "name": "devconnector",
    "version": "1.0.0",
    "description": "Social network for developers",
    "main": "server.js",
    "scripts": {
        "start": "node server",
        "server": "nodemon server"
    },
    "author": "Sanket Pagadpalliwar",
    "license": "MIT",
    "dependencies": {
        "bcryptjs": "^2.4.3",
        "config": "^3.3.7",
        "dotenv": "^16.0.0",
        "express": "^4.17.3",
        "express-validator": "^6.14.0",
        "gravatar": "^1.8.2",
        "jsonwebtoken": "^8.5.1",
        "mongoose": "^6.2.9",
        "request": "^2.88.2"
    },
    "devDependencies": {
        "concurrently": "^7.0.0",
        "nodemon": "^2.0.15"
    }
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Most likely the file in the specified D:\Education\nodemon\bin\nodemon.js field in your nodemon module may be missing or corrupt. Have you checked the file? If there is no problem with the file, try reinstalling it the way you installed it, this will most likely solve the problem.

Have a nice day

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda