簡體   English   中英

我該如何解決“babel-node”未被識別為內部或外部命令、可運行程序或批處理文件的問題?

[英]how can i fix this issue 'babel-node' is not recognized as an internal or external command, operable program or batch file.?

我正在從事 node.js 項目。 我使用 Babel 創建了這個項目,它在以前使用節點系統時運行良好。 我已經在我的系統中更新了 node.js 版本,之后我收到了 Bebel-node 的錯誤。 任何人都可以幫助我如何解決這個問題??b 我已經安裝了所有 bebal.js 模塊。

I'm using code in bebel.rc
{
    "plugins": [
        "@babel/plugin-transform-runtime"
    ],
    "presets": [
        "@babel/env"
    ],
    "ignore": [
        "node_modules",
        "src/public"
    ]
}

this is my updated  package.json ....
{
  "name": "backend-buluckart-hashing.company",
  "version": "0.1.0",
  "description": "groffers-nepal",
  "main": "index.js",
  "scripts": {
    "start": "nodemon src/index.js --exec babel-node --presets @babel/env",
    "build": "babel src -d dist --source-maps inline --copy-files",
    "serve": "node dist/index.js",
    "sequelize": "sequelize"
  },
  "keywords": [],
  "author": "Ashutosh singh",
  "license": "ISC",
  "homepage": "",
  "nodemonConfig": {
    "ignore": [
      "src/public/*"
    ]
  },
  "devDependencies": {
    "@babel/cli": "^7.17.6",
    "@babel/core": "^7.17.5",
    "@babel/node": "^7.16.8",
    "@babel/plugin-transform-runtime": "^7.17.0",
    "@babel/preset-env": "^7.16.11",
    "nodemon": "^2.0.15"
  },
  "dependencies": {
    "@babel/runtime": "^7.17.2",
    "aws-sdk": "^2.700.0",
    "babel-upgrade": "^1.0.1",
    "bcrypt-nodejs": "0.0.3",
    "body-parser": "^1.18.3",
    "cookie-parser": "^1.4.3",
    "cors": "^2.8.5",
    "dateformat": "^3.0.3",
    "dotenv": "^8.0.0",
    "event-stream": "^4.0.1",
    "express": "^4.16.3",
    "express-handlebars": "^6.0.2",
    "express-sanitizer": "^1.0.5",
    "express-session": "^1.15.6",
    "helmet": "^3.15.1",
    "joi": "^14.3.0",
    "joi-date-extensions": "^1.2.0",
    "jsonwebtoken": "^8.3.0",
    "kue": "^0.11.1",
    "mailparser": "^3.4.0",
    "moment": "^2.24.0",
    "morgan": "^1.9.0",
    "multer": "^1.4.1",
    "multer-s3": "^2.9.0",
    "mysql": "^2.16.0",
    "mysql2": "^1.6.4",
    "passport": "^0.4.0",
    "passport-jwt": "^4.0.0",
    "passport-local": "^1.0.0",
    "qs": "^6.10.3",
    "radis": "^2.0.0",
    "razorpay": "^2.0.6",
    "react-bootstrap": "^2.1.2",
    "read-excel-file": "^5.2.26",
    "request": "^2.88.0",
    "rotating-file-stream": "^1.4.1",
    "sequelize": "^5.21.13",
    "sequelize-cli": "^6.4.1",
    "speakeasy": "^2.0.0",
    "stack-trace": "0.0.10",
    "twilio": "^3.72.0"
  }
}
 "start": "nodemon --exec npx babel-node src/index.js",

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM