Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

254
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!