Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.0 is not a valid Plugin property #9955

Closed
Tianpei9 opened this issue May 7, 2019 · 3 comments
Closed

.0 is not a valid Plugin property #9955

Tianpei9 opened this issue May 7, 2019 · 3 comments
Labels
i: question outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@Tianpei9
Copy link

Tianpei9 commented May 7, 2019

Bug Report

Current Behavior
A clear and concise description of the behavior.
trying to update babel from 6.22 to 7 for a react app, ran npx babel-upgrade --write command but got this error
Input Code

  • REPL or Repo link if applicable:
    this is our package.json
{
  "version": "2.0.266",
  "scripts": {
    "start": "NODE_ENV=production CONTEXT_ROOT=/seedscripts node ./bin/www",
    "dev": "cross-env NODE_ENV=development CONTEXT_ROOT=/seedscripts node ./bin/www",
    "clean": "rm -rf node_modules coverage",
    "test": "NODE_ENV=test nyc --extension .jsx --extension .js --reporter=html --reporter=text mocha --recursive -r test/setup.js -r test/compiler.js --exit",
    "test:dev": "nyc --extension .jsx --extension .js --reporter=html --reporter=text mocha --watch test",

  },
  
  "dependencies": {
    "compression": "~1.7.4",
    "express": "^4.16.4",
    "jade": "^1.11.0",
    "lodash": "^4.17.11",
    "react-table": "~6.9.2",
    "terraformer-wkt-parser": "^1.2.0",
    "underscore": "^1.9.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-proposal-class-properties": "^7.0.0",
    "@babel/plugin-proposal-decorators": "^7.0.0",
    "@babel/plugin-proposal-do-expressions": "^7.0.0",
    "@babel/plugin-proposal-export-default-from": "^7.0.0",
    "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
    "@babel/plugin-proposal-function-bind": "^7.0.0",
    "@babel/plugin-proposal-function-sent": "^7.0.0",
    "@babel/plugin-proposal-json-strings": "^7.0.0",
    "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
    "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
    "@babel/plugin-proposal-numeric-separator": "^7.0.0",
    "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
    "@babel/plugin-proposal-optional-chaining": "^7.0.0",
    "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
    "@babel/plugin-proposal-throw-expressions": "^7.0.0",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0",
    "@babel/plugin-syntax-import-meta": "^7.0.0",
    "@babel/polyfill": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "@babel/preset-react": "^7.0.0",
    "@babel/register": "^7.0.0",
    "@babel/runtime-corejs2": "^7.0.0",
    "@material-ui/core": "~3.9.2",
    "@material-ui/icons": "~3.0.2",
    "babel-core": "^7.0.0-bridge.0",
    "babel-loader": "7.1.1",
    "babel-preset-next": "^1.2.0",
    "bootstrap": "~3.4.1",
    "bootstrap-sass": "~3.4.1",
    "browserify": "^13.0.0",
    "canvas": "^2.2.0",
    "chai": "^4.2.0",
    "chai-enzyme": "^1.0.0-beta.1",
    "classnames": "^2.2.5",
    "cross-env": "^1.0.8",
    "enzyme": "~3.9.0",
    "enzyme-adapter-react-16": "~1.7.1",
    "es6-promise": "^3.3.1",
    "es6-request": "^2.4.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "fetch-mock": "~7.3.1",
    "handlebars": "~4.1.1",
    "handlebars-loader": "~1.7.1",
    "history": "~4.7.2",
    "istanbul-cobertura-badger": "^1.3.0",
    "jquery": "^3.3.1",
    "jsdom": "~13.2.0",
    "json-loader": "^0.5.4",
    "json-templater": "^1.2.0",
    "json2csv": "~4.3.5",
    "less": "~3.9.0",
    "less-middleware": "^2.2.1",
    "material-components-web": "^0.41.0",
    "material-icons": "^0.2.3",
    "mime-types": "~2.1.22",
    "mocha": "^5.2.0",
    "moment": "~2.24.0",
    "nock": "~10.0.6",
    "node-sass": "~4.11.0",
    "node-sass-middleware": "^0.11.0",
    "nyc": "~13.3.0",
    "ol": "^4.6.5",
    "piping": "^0.3.0",
    "postcss-loader": "^2.1.6",
    "prop-types": "~15.7.2",
    "query-string": "~6.2.0",
    "rc-progress": "~2.3.0",
    "react": "~16.8.4",
    "react-bootstrap": "^0.32.4",
    "react-dom": "~16.8.4",
    "react-faux-dom": "^2.7.1",
    "react-fontawesome": "^1.6.1",
    "react-notification-system-redux": "^1.2.0",
    "react-redux": "~5.1.1",
    "react-router": "^4.3.1",
    "react-router-dom": "4.2.2",
    "react-select": "^1.3.0",
    "react-selectable": "^1.3.4",
    "react-test-renderer": "^15.6.2",
    "react-textselect": "^0.2.0",
    "reactable": "^0.14.1",
    "redux": "^3.7.2",
    "redux-logger": "^2.10.2",
    "redux-mock-store": "^1.5.3",
    "redux-thunk": "^2.3.0",
    "reselect": "^2.5.4",
    "rimraf": "~2.6.3",
    "rmwc": "^4.0.5",
    "sass-loader": "^4.1.1",
    "selenium-webdriver": "^3.6.0",
    "sinon": "~7.3.0",
    "sinon-chai": "~3.3.0",
    "socket.io": "2.1.1",
    "style-loader": "^0.23.1",
    "styled-components": "~4.1.3",
    "webpack": "^1.15.0",
    "webpack-dev-middleware": "^1.12.2"
  },
  "engines": {
    "node": "8.11.3",
    "npm": "6.4.1"
  }
}

Expected behavior/code
A clear and concise description of what you expected to happen (or code).

Babel Configuration (.babelrc, package.json, cli command)
This is our .babelrc

{
    "presets": [
        "@babel/preset-react",
        "@babel/preset-env",
    ],
    "plugins": [
        ["@babel/plugin-proposal-object-rest-spread", {}, "unique-name-a"],
        ["@babel/plugin-syntax-dynamic-import", {}, "unique-name-b"],
        ["@babel/plugin-syntax-import-meta", {}, "unique-name-d"],
        ["@babel/plugin-proposal-class-properties", {}, "unique-name-c"],
        ["@babel/plugin-proposal-json-strings", {}, "unique-name-e"],
        [
            ["@babel/plugin-proposal-decorators", {}, "unique-name-p"],
            {
                "legacy": true
            }
        ],
        ["@babel/plugin-proposal-function-sent", {}, "unique-name-f"],
        ["@babel/plugin-proposal-export-namespace-from", {}, "unique-name-g"],
        ["@babel/plugin-proposal-numeric-separator", {}, "unique-name-h"],
        ["@babel/plugin-proposal-throw-expressions", {}, "unique-name-i"],
        ["@babel/plugin-proposal-export-default-from", {}, "unique-name-j"],
        ["@babel/plugin-proposal-logical-assignment-operators", {}, "unique-name-k"],
        ["@babel/plugin-proposal-optional-chaining", {}, "unique-name-l"],
        [
            ["@babel/plugin-proposal-pipeline-operator", {}, "unique-name-"],
            {
                "proposal": "minimal"
            }
        ],
        ["@babel/plugin-proposal-nullish-coalescing-operator", {}, "unique-name-m"],
        ["@babel/plugin-proposal-do-expressions", {}, "unique-name-n"],
        ["@babel/plugin-proposal-function-bind", {}, "unique-name-o"],
    ]
}

Environment

  • Babel version(s): [v7.0.0]
  • Node/npm version: [e.g. Node 8/npm 5]
  • OS: [e.g. OSX 10.13.4]
  • Monorepo: [e.g. yes/no/Lerna]
  • How you are using Babel: [ loader]

Possible Solution

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.

@babel-bot
Copy link
Collaborator

Hey @Tianpei9! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community
that typically always has someone willing to help. You can sign-up here
for an invite.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented May 7, 2019

        [
            ["@babel/plugin-proposal-decorators", {}, "unique-name-p"],
            {
                "legacy": true
            }
        ],

should be

        ["@babel/plugin-proposal-decorators", { "legacy: true }, "unique-name-p"],

The same applies to @babel/plugin-proposal-pipeline-operator.

@Tianpei9
Copy link
Author

Tianpei9 commented May 7, 2019

Thanks @nicolo-ribaudo, that fixed the issue

@Tianpei9 Tianpei9 closed this as completed May 7, 2019
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: question outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants