{"action":"created","issue":{"url":"https://api.github.com/repos/electron-userland/electron-forge/issues/367","repository_url":"https://api.github.com/repos/electron-userland/electron-forge","labels_url":"https://api.github.com/repos/electron-userland/electron-forge/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/electron-userland/electron-forge/issues/367/comments","events_url":"https://api.github.com/repos/electron-userland/electron-forge/issues/367/events","html_url":"https://github.com/electron-userland/electron-forge/issues/367","id":274644252,"number":367,"title":"Import error running brand new project","user":{"login":"squaretone","id":342936,"avatar_url":"https://avatars0.githubusercontent.com/u/342936?v=4","gravatar_id":"","url":"https://api.github.com/users/squaretone","html_url":"https://github.com/squaretone","followers_url":"https://api.github.com/users/squaretone/followers","following_url":"https://api.github.com/users/squaretone/following{/other_user}","gists_url":"https://api.github.com/users/squaretone/gists{/gist_id}","starred_url":"https://api.github.com/users/squaretone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaretone/subscriptions","organizations_url":"https://api.github.com/users/squaretone/orgs","repos_url":"https://api.github.com/users/squaretone/repos","events_url":"https://api.github.com/users/squaretone/events{/privacy}","received_events_url":"https://api.github.com/users/squaretone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-16T19:58:26Z","updated_at":"2017-11-16T23:13:45Z","closed_at":null,"author_association":"NONE","body":"* [x] I have read the [contribution documentation](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.\r\n* [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project follows, as appropriate.\r\n* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.\r\n\r\n**Please describe your issue:**\r\nWhen I run `npm start` on my newly created app, an error is thrown from /src/index.js:\r\n`\r\nSyntaxError: Unexpected token import\r\n`\r\n\r\n**Console output when you run `electron-forge` with the environment variable `DEBUG=electron-forge:*`. (Instructions on how to do so [here](https://www.npmjs.com/package/debug#usage)). Please include the stack trace if one exists.**\r\n\r\n```\r\n~ npm start\r\n\r\n> my-new-app@1.0.0 start /Users/demo/Desktop/_delete/Electron/my-new-app\r\n> electron-forge start\r\n\r\nWARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle\r\nWARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle\r\nApp threw an error during load\r\n/Users/demo/Desktop/_delete/Electron/my-new-app/src/index.js:1\r\n(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import { app, BrowserWindow } from 'electron';\r\n                                                                                                                                                           ^^^^^^\r\nSyntaxError: Unexpected token import\r\n    at createScript (vm.js:53:10)\r\n    at Object.runInThisContext (vm.js:95:10)\r\n    at Module._compile (module.js:543:28)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/demo/Desktop/_delete/Electron/my-new-app/node_modules/electron-compile/lib/require-hook.js:77:14)\r\n    at Module.load (module.js:488:32)\r\n    at tryModuleLoad (module.js:447:12)\r\n    at Function.Module._load (module.js:439:3)\r\n    at Module.require (module.js:498:17)\r\n    at init (/Users/demo/Desktop/_delete/Electron/my-new-app/node_modules/electron-compile/lib/config-parser.js:294:16)\r\n    at main (/Users/demo/Desktop/_delete/Electron/my-new-app/node_modules/electron-prebuilt-compile/lib/es6-init.js:56:29)\r\nGVA info: Successfully connected to the Intel plugin, offline Gen7\r\n\r\n```\r\n\r\n**What command line arguments are you passing?**\r\nnone, just calling npm start\r\n```\r\nnone\r\n```\r\n\r\n**What does your `config.forge` data in `package.json` look like?**\r\nStock one...\r\n```\r\n\"forge\": {\r\n            \"make_targets\": {\r\n                \"win32\": [\r\n                    \"squirrel\"\r\n                ],\r\n                \"darwin\": [\r\n                    \"zip\"\r\n                ],\r\n                \"linux\": [\r\n                    \"deb\",\r\n                    \"rpm\"\r\n                ]\r\n            },\r\n            \"electronPackagerConfig\": {\r\n                \"packageManager\": \"npm\"\r\n            },\r\n            \"electronWinstallerConfig\": {\r\n                \"name\": \"my_new_app\"\r\n            },\r\n            \"electronInstallerDebian\": {},\r\n            \"electronInstallerRedhat\": {},\r\n            \"github_repository\": {\r\n                \"owner\": \"\",\r\n                \"name\": \"\"\r\n            },\r\n            \"windowsStoreConfig\": {\r\n                \"packageName\": \"\",\r\n                \"name\": \"mynewapp\"\r\n            }\r\n        }\r\n```\r\n\r\n**Please provide either a failing minimal testcase (with a link to the code) or detailed steps to\r\nreproduce your problem. Using `electron-forge init` is a good starting point, if that is not the\r\nsource of your problem.**\r\nMy best guess is that this is something with the Babel configuration. If i replace the import statements with traditional require statements, all is well.\r\n\r\nNote this is a clean install following the directions from the [README.md](https://github.com/electron-userland/electron-forge/blob/master/README.md) file:\r\n\r\n```bash\r\nnpm install -g electron-forge\r\nelectron-forge init my-new-app\r\ncd my-new-app\r\nnpm start\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/electron-userland/electron-forge/issues/comments/345093517","html_url":"https://github.com/electron-userland/electron-forge/issues/367#issuecomment-345093517","issue_url":"https://api.github.com/repos/electron-userland/electron-forge/issues/367","id":345093517,"user":{"login":"malept","id":11417,"avatar_url":"https://avatars1.githubusercontent.com/u/11417?v=4","gravatar_id":"","url":"https://api.github.com/users/malept","html_url":"https://github.com/malept","followers_url":"https://api.github.com/users/malept/followers","following_url":"https://api.github.com/users/malept/following{/other_user}","gists_url":"https://api.github.com/users/malept/gists{/gist_id}","starred_url":"https://api.github.com/users/malept/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malept/subscriptions","organizations_url":"https://api.github.com/users/malept/orgs","repos_url":"https://api.github.com/users/malept/repos","events_url":"https://api.github.com/users/malept/events{/privacy}","received_events_url":"https://api.github.com/users/malept/received_events","type":"User","site_admin":false},"created_at":"2017-11-16T23:13:45Z","updated_at":"2017-11-16T23:13:45Z","author_association":"OWNER","body":"@MarshallOfSound do you think it would be worth it to get the Babel debug output from the problematic installation?"}}
{"actor":{"display_login":"malept"}}