1

I'm trying to use @babel/core, @babel/cli, @babel/plugin-transform-regenerator, @babel/preset-env and @babel/runtime with Node.js application. I'm not using webpack, just babel. Now my problem is when I'm trying to build my project by running npm run dev it throws Unknown option: .name.

Detailed error:

Error: [BABEL] C:\Users\Pc\Documents\Projects\Quadria\discord-bot\src\app.js: Unknown option: .name. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

Here is my package.json

  "dependencies": {
    "@babel/cli": "^7.13.14",
    "@babel/core": "^7.13.15",
    "@babel/plugin-transform-regenerator": "^7.13.15",
    "@babel/preset-env": "^7.13.15",
    "@babel/runtime": "^7.13.10",
    "better-sqlite3": "^7.1.4",
    "chalk": "^4.1.0",
    "discord.js": "^12.5.3",
    "dotenv": "^8.2.0",
    "moment": "^2.29.1",
    "mongoose": "^5.11.5",
    "ms": "^2.1.2",
    "npm-run-all": "^4.1.5",
    "quick.db": "^7.1.3",
    "request": "^2.79.0",
    "rimraf": "^3.0.2",
    "slash-commands": "^1.4.0",
    "tmi.js": "^1.7.5"
  },
  "scripts": {
    "build": "npm-run-all clean transpile",
    "dev": "npm-run-all build client",
    "client": "node ./dist/app.js",
    "transpile": "babel ./src --out-dir dist",
    "clean": "rimraf dist-server"
  },
  "author": "github.com/ataegeasilturk",
  "license": "ISC",
  "devDependencies": {
    "@babel/plugin-transform-runtime": "^7.13.15",
    "nodemon": "^2.0.7"
  },
  "babel": {
    "presets": [
      "@babel/preset-env",
      "module:@babel/plugin-transform-runtime"
    ]
  }
Ata Ege
  • 40
  • 1
  • 7
  • Does this answer your question? [Unknown Option error from Babel in React-Native app](https://stackoverflow.com/questions/64225453/unknown-option-error-from-babel-in-react-native-app) – Charlie Bamford Apr 08 '21 at 19:00
  • No, because I'm not using React-Native. I add all my projects dependencies. – Ata Ege Apr 08 '21 at 19:11

0 Answers0