kmagiera / babel-watch

Reload your babel-node app on JS source file changes. And do it fast.
MIT License
528 stars 70 forks source link

Babel-watch inspect mode not working #103

Closed vikramgupta1988 closed 3 years ago

vikramgupta1988 commented 5 years ago

My package.json file

{
  "name": "console-proxy",
  "version": "1.0.0",
  "private": true,
  "engines": {
    "node": ">=11.5.0"
  },
  "husky": {
    "hooks": {
      "pre-commit": "yarn run lint:js"
    }
  },
  "dependencies": {
    "@babel/cli": "^7.4.4",
    "@babel/core": "^7.4.5",
    "@babel/node": "^7.4.5",
    "@babel/plugin-transform-arrow-functions": "^7.2.0",
    "@babel/plugin-transform-async-to-generator": "^7.4.4",
    "@babel/plugin-transform-runtime": "^7.4.4",
    "@babel/preset-env": "^7.4.5",
    "@babel/register": "^7.4.4",
    "@babel/runtime": "^7.4.5",
    "axios": "^0.19.0",
    "babel-watch": "^7.0.0",
    "bunyan": "^1.8.12",
    "config": "^3.1.0",
    "connect-flash": "^0.1.1",
    "cookie": "^0.4.0",
    "cookie-parser": "^1.4.4",
    "debug": "~4.1.1",
    "eslint": "^5.16.0",
    "eslint-config-airbnb-base": "^13.1.0",
    "eslint-plugin-import": "^2.17.3",
    "express": "~4.17.1",
    "express-session": "^1.16.1",
    "http-errors": "~1.7.2",
    "husky": "^2.4.0",
    "morgan": "~1.9.1",
    "nodemon": "^1.19.1",
    "path": "^0.12.7",
    "pug": "^2.0.3",
    "rimraf": "^2.6.3"
  },
  "scripts": {
    "dev2": "nodemon -V --inspect -e js,json,pug,css --ignore dist/",
    "dev": "yarn run start && babel-watch --watch views app.js --inspect --inspect-brk",
    "build": "rimraf dist/ && babel ./ --out-dir dist --ignore ./node_modules,./.babelrc,./package.json,./npm-debug.log --copy-files --source-maps",
    "start": "yarn run build && babel-node ./bin/www",
    "prod": "NODE_ENV=production yarn run build && node ./dist/bin/www",
    "lint:js": "eslint --fix ."
  }
}

Running yarn run dev doesn't starts node in inspect mode and thus chrome nodejs devtools are not working. Running yarn run dev2 starts nodemon in inspect mode and that works fine. However, nodemon takes a lot of time to rebuild and hampers productivity. Anything wrong that I've done...

STRML commented 3 years ago

I believe this was fixed in 786dc0fb7018552674f0909d0a3a170a4dd51743. Can you try again with 7.1.0?

STRML commented 3 years ago

Closing pending clarification.