{"action":"closed","issue":{"url":"https://api.github.com/repos/parcel-bundler/parcel/issues/1538","repository_url":"https://api.github.com/repos/parcel-bundler/parcel","labels_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/1538/labels{/name}","comments_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/1538/comments","events_url":"https://api.github.com/repos/parcel-bundler/parcel/issues/1538/events","html_url":"https://github.com/parcel-bundler/parcel/issues/1538","id":332476938,"node_id":"MDU6SXNzdWUzMzI0NzY5Mzg=","number":1538,"title":"Experimental scope hoisting: Cannot read property 'constantViolations' of undefined","user":{"login":"DragonRaider5","id":6208890,"node_id":"MDQ6VXNlcjYyMDg4OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6208890?v=4","gravatar_id":"","url":"https://api.github.com/users/DragonRaider5","html_url":"https://github.com/DragonRaider5","followers_url":"https://api.github.com/users/DragonRaider5/followers","following_url":"https://api.github.com/users/DragonRaider5/following{/other_user}","gists_url":"https://api.github.com/users/DragonRaider5/gists{/gist_id}","starred_url":"https://api.github.com/users/DragonRaider5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DragonRaider5/subscriptions","organizations_url":"https://api.github.com/users/DragonRaider5/orgs","repos_url":"https://api.github.com/users/DragonRaider5/repos","events_url":"https://api.github.com/users/DragonRaider5/events{/privacy}","received_events_url":"https://api.github.com/users/DragonRaider5/received_events","type":"User","site_admin":false},"labels":[{"id":663703608,"node_id":"MDU6TGFiZWw2NjM3MDM2MDg=","url":"https://api.github.com/repos/parcel-bundler/parcel/labels/:bug:%20Bug","name":":bug: Bug","color":"d93f0b","default":false},{"id":965131741,"node_id":"MDU6TGFiZWw5NjUxMzE3NDE=","url":"https://api.github.com/repos/parcel-bundler/parcel/labels/%F0%9F%8C%B3%20Tree%20Shaking","name":"🌳 Tree Shaking","color":"1add8c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-06-14T16:30:44Z","updated_at":"2018-11-18T15:39:51Z","closed_at":"2018-11-18T15:39:51Z","author_association":"NONE","body":"# 🐛 bug report\r\n\r\nI tried to build my React project with the new experimental scope hoisting enabled (`--experimental-scope-hoisting`) and it crashed (works without the feature enabled).\r\n\r\n## 🎛 Configuration\r\n\r\ncli:\r\n`parcel build src/index.html --out-dir dist --public-url ./dist/ --no-cache --experimental-scope-hoisting`\r\n\r\n.babelrc:\r\n```js\r\n{\r\n  \"presets\": [\r\n    \"env\",\r\n    \"react\"\r\n  ],\r\n  \"plugins\": [\r\n    [ \"transform-runtime\", {\r\n      \"helpers\": false,\r\n      \"polyfill\": false,\r\n      \"regenerator\": true,\r\n      \"moduleName\": \"babel-runtime\"\r\n    } ],\r\n    \"styled-components\",\r\n    \"transform-object-rest-spread\",\r\n    \"transform-class-properties\",\r\n    \"transform-async-to-generator\",\r\n    \"inline-react-svg\",\r\n    \"react-intl\"\r\n  ]\r\n}\r\n```\r\n\r\n## 🤔 Expected Behavior\r\n\r\nParcel bundles my application.\r\n\r\n## 😯 Current Behavior\r\n\r\nParcel didn't bundle my application.\r\n\r\nStacktrace:\r\n```\r\n🚨  /Users/user/development/project/src/shared/services/LanguageService.js: Cannot read property 'constantViolations' of undefined\r\n    at rename (/Users/user/development/project/node_modules/parcel-bundler/src/scope-hoisting/renamer.js:9:33)\r\n    at JSAsset.ImportDeclaration (/Users/user/development/project/node_modules/parcel-bundler/src/scope-hoisting/hoist.js:325:7)\r\n    at NodePath._call (/Users/user/development/project/node_modules/babel-traverse/lib/path/context.js:76:18)\r\n    at NodePath.call (/Users/user/development/project/node_modules/babel-traverse/lib/path/context.js:48:17)\r\n    at NodePath.visit (/Users/user/development/project/node_modules/babel-traverse/lib/path/context.js:105:12)\r\n    at TraversalContext.visitQueue (/Users/user/development/project/node_modules/babel-traverse/lib/context.js:150:16)\r\n    at TraversalContext.visitMultiple (/Users/user/development/project/node_modules/babel-traverse/lib/context.js:103:17)\r\n    at TraversalContext.visit (/Users/user/development/project/node_modules/babel-traverse/lib/context.js:190:19)\r\n    at Function.traverse.node (/Users/user/development/project/node_modules/babel-traverse/lib/index.js:114:17)\r\n    at NodePath.visit (/Users/user/development/project/node_modules/babel-traverse/lib/path/context.js:115:19)\r\n```\r\n\r\n## 🔦 Context\r\n\r\nMy `LanguageService` contains some dynamic imports and has only one import (`browser-locale`) - maybe it's related to the dynamic imports or to that package in particular?\r\n\r\n## 🌍 Your Environment\r\n\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n| Software         | Version(s) |\r\n| ---------------- | ---------- |\r\n| Parcel           | 1.9.0 |\r\n| Node             | 8.9.1 |\r\n| npm/Yarn         | npm 6.1.0 |\r\n| Operating System | macOS High Sierra |\r\n"}}
{"actor":{"display_login":"devongovett"}}