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

Property name expected type of string but got null #11411

Closed
jeremytenjo opened this issue Apr 13, 2020 · 4 comments
Closed

Property name expected type of string but got null #11411

jeremytenjo opened this issue Apr 13, 2020 · 4 comments
Labels
i: bug i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@jeremytenjo
Copy link

jeremytenjo commented Apr 13, 2020

error

TypeError: C:\Dev\Personal_Projects\web-toolkit\src\ambient\particles\index.js: Property name expected type of string but got null
    at validate (C:\Dev\Personal_Projects\web-toolkit\node_modules\@babel\types\lib\definitions\utils.js:160:13)
    at Object.validate (C:\Dev\Personal_Projects\web-toolkit\node_modules\@babel\types\lib\definitions\utils.js:229:7)
    at validateField (C:\Dev\Personal_Projects\web-toolkit\node_modules\@babel\types\lib\validators\validate.js:24:9)
    at validate (C:\Dev\Personal_Projects\web-toolkit\node_modules\@babel\types\lib\validators\validate.js:17:3)
    at builder (C:\Dev\Personal_Projects\web-toolkit\node_modules\@babel\types\lib\builders\builder.js:38:27)
    at Object.Identifier (C:\Dev\Personal_Projects\web-toolkit\node_modules\@babel\types\lib\builders\generated\index.js:337:31)
    at C:\Dev\Personal_Projects\web-toolkit\node_modules\regenerator-transform\lib\hoist.js:32:29
    at Array.forEach (<anonymous>)
    at varDeclToExpr (C:\Dev\Personal_Projects\web-toolkit\node_modules\regenerator-transform\lib\hoist.js:29:23)
    at exit (C:\Dev\Personal_Projects\web-toolkit\node_modules\regenerator-transform\lib\hoist.js:51:20) {
  code: 'BABEL_TRANSFORM_ERROR'

particles\index.js

const hello = async () => {
  const he = { ll: '2' }
  const { ll } = he
}

babel config

module.exports = {
  presets: [
    [
      require('@babel/preset-env'),
      {
        targets: 'defaults, not ie <= 11, not edge > 0, not IE_Mob 11',
        modules: false
      }
    ],
    require('@babel/preset-react')
  ],
  plugins: [
    require('react-hot-loader/babel'),
    require('@babel/plugin-transform-regenerator'),
    require('@babel/plugin-syntax-dynamic-import'),
    require('@babel/plugin-syntax-throw-expressions'),
    require('@babel/plugin-transform-runtime'),
    require('babel-plugin-styled-components')
  ],
  env: {
    production: {
      plugins: [require('babel-plugin-transform-react-remove-prop-types')]
    }
  }
}

package.json

  "dependencies": {
    "@babel/core": "^7.9.0",
    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
    "@babel/plugin-syntax-throw-expressions": "^7.8.3",
    "@babel/plugin-transform-regenerator": "^7.8.7",
    "@babel/plugin-transform-runtime": "^7.9.0",
    "@babel/preset-env": "^7.9.0",
    "@babel/preset-react": "^7.9.4",
    "babel-eslint": "^10.1.0",
    "babel-jest": "^25.1.0",
    "babel-loader": "^8.1.0",
    "babel-plugin-styled-components": "^1.10.7",
    "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
    "react-hot-loader": "^4.12.20"
  },

node version v12.13.1

Thanks

@babel-bot
Copy link
Collaborator

Hey @tenjojeremy! 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."

@existentialism
Copy link
Member

@tenjojeremy I believe this is related to #10808 (comment)

@liuliangsir
Copy link
Contributor

Same issue here

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Apr 17, 2020

I'm closing this as a duplicate of facebook/regenerator#391

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: needs triage 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

5 participants