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

255
Visualizações
Webpack+Babel | C:\node_modules doesn't exist or is not a directory | JS

hope you doing great.

I just tried using babel and webpack but for some reason it doesn't work. I even bought a new computer but no change...

Every time I start running the webpack command (node_modules/.bin/webpack). I am getting the error: C:\node_modules doesn't exist or is not a directory

The same happens when I using babel without webpack: The "node_modules" command is either misspelled or could not be found. (I am calling a start script from package.json file here - node_modules/.bin/babel ./src/index.js -o ./dist/assets/bundle.js)

The path clearly exsists on my computer. Also I checked several times that I am in the correct folder in my terminal... My package.json file looks like this:

{
      "name": "chapter_19",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "babel": "node_modules/.bin/babel ./src/index.js -o ./dist/assets/bundle.js"
      },
      "author": "",
      "license": "ISC",
      "devDependencies": {
        "@babel/cli": "^7.2.3",
        "@babel/core": "^7.3.4",
        "@babel/preset-env": "^7.3.4"
      },
      "dependencies": {
        "webpack": "^5.72.1",
        "webpack-cli": "^4.9.2"
      }
    }

Here's my webpack file:

  const path = require('path');

module.exports = {
    entry:':/src/index.js',
    output:{
        path: path.resolve(__dirname, 'dist/assets'),
        filename: 'bundle.js'
    }
}

And my files/folders image

Does someome maybe what's going on here?

Help would be greatly greatly appreciated.Thanks.

about 4 years ago · Juan Pablo Isaza
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