Skip to content

🐛 wrong babel usage #482

@nnn406

Description

@nnn406

I don't know is that a bug report or my mistake, but whole day today I'm struggling and get different behavior from time to time.

This is my .babelrc

{
  "presets": [
    "env",
    "stage-1",
    "react"
  ],
  "plugins": ["transform-react-jsx"],
  "ignore": [
    "node_modules"
  ]
}

and this is the message what I see

Server running at http://localhost:1234
🚨  /.../node_modules/attr-accept/dist/index.js: [BABEL] /.../node_modules/attr-accept/dist/index.js: Using removed Babel 5 option: /.../node_modules/attr-accept/.babelrc.stage - Check out the corresponding stag    at Logger.error (/.../node_modules/babel-core/lib/transformation/file/logger.js:41:11)
    at OptionManager.mergeOptions (/.../node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:20)
    at OptionManager.init (/.../node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/.../node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/.../node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at JSAsset.getParserOptions (/.../node_modules/parcel-bundler/src/assets/JSAsset.js:60:20)
    at <anonymous>

that happens when I use react-dropzone package. Looks like that parcel/babel transpile node_modules as well?

here is my package.json

  "dependencies": {
    "prop-types": "15.6.0",
    "react": "16.1.0",
    "react-dom": "^16.2.0",
    "react-dropzone": "4.2.3",
    "react-pdf": "2.5.2"
  },
  "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-plugin-add-module-exports": "0.2.1",
    "babel-plugin-transform-react-jsx": "^6.24.1",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "6.24.1",
    "babel-preset-stage-1": "6.24.1",
    "cross-env": "^5.1.1",
    "enzyme-adapter-react-16": "^1.1.0",
    "eslint": "4.14.0",
    "eslint-config-airbnb": "16.1.0",
    "eslint-plugin-import": "2.8.0",
    "eslint-plugin-jsx-a11y": "6.0.3",
    "eslint-plugin-react": "7.5.1",
    "jest": "^21.2.1",
    "node-sass": "^4.7.2",
    "parcel-bundler": "^1.1.0",
    "prettier": "^1.9.1"
  }

as soon as I don't use that package everything is ok.

 parcel --version
1.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions