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

scope hoisting: Cannot read property 'constantViolations' of undefined #2255

Closed
rambo-panda opened this issue Nov 6, 2018 · 1 comment · Fixed by #2292
Closed

scope hoisting: Cannot read property 'constantViolations' of undefined #2255

rambo-panda opened this issue Nov 6, 2018 · 1 comment · Fixed by #2292

Comments

@rambo-panda
Copy link

rambo-panda commented Nov 6, 2018

🐛 bug report

https://github.com/parcel-bundler/parcel/blob/v1.10.3/src/scope-hoisting/renamer.js#L6 will be throw an error Cannot read property 'constantViolations' of undefined when l use
npx -n '--inspect-brk' parcel build --no-minify --experimental-scope-hoisting --no-source-maps --no-cache --log-level 4 main.js

🎛 Configuration (.babelrc, package.json, cli command)

{
  "name": "tmp",
  "version": "1.0.0",
  "description": "",
  "dependencies": {
    "@babel/cli": "^7.1.2",
    "@babel/core": "^7.1.2",
    "@babel/plugin-transform-runtime": "^7.1.0",
    "@babel/runtime": "^7.1.2",
    "lodash.once": "^4.1.1",
    "parcel-bundler": "^1.10.3"
  },
  "license": "ISC"
}

// .babelrc
{
  "plugins": [
    [
      "@babel/plugin-transform-runtime",
      {
        "corejs": false,
        "helpers": false,
        "regenerator": true
      }
    ]
  ]
}

😯 Current Behavior

blocking

💻 Code Sample

main.js

const v  = async () => {
	const x = await new Promise((resolve) => {
		resolve(1)
	});

	return x;
};

v().then(r=>{
	console.log(r);
});

🌍 Your Environment

Software Version(s)
Parcel 1.10.3
Node 10.13
npm/Yarn 6.4.1
Operating System mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@DeMoorJasper @rambo-panda and others