{"action":"created","issue":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/6697","repository_url":"https://api.github.com/repos/nwjs/nw.js","labels_url":"https://api.github.com/repos/nwjs/nw.js/issues/6697/labels{/name}","comments_url":"https://api.github.com/repos/nwjs/nw.js/issues/6697/comments","events_url":"https://api.github.com/repos/nwjs/nw.js/issues/6697/events","html_url":"https://github.com/nwjs/nw.js/issues/6697","id":333073064,"node_id":"MDU6SXNzdWUzMzMwNzMwNjQ=","number":6697,"title":"nwjc: segmentation fault compiling es6 module","user":{"login":"alxproject","id":40313249,"node_id":"MDQ6VXNlcjQwMzEzMjQ5","avatar_url":"https://avatars2.githubusercontent.com/u/40313249?v=4","gravatar_id":"","url":"https://api.github.com/users/alxproject","html_url":"https://github.com/alxproject","followers_url":"https://api.github.com/users/alxproject/followers","following_url":"https://api.github.com/users/alxproject/following{/other_user}","gists_url":"https://api.github.com/users/alxproject/gists{/gist_id}","starred_url":"https://api.github.com/users/alxproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxproject/subscriptions","organizations_url":"https://api.github.com/users/alxproject/orgs","repos_url":"https://api.github.com/users/alxproject/repos","events_url":"https://api.github.com/users/alxproject/events{/privacy}","received_events_url":"https://api.github.com/users/alxproject/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-17T16:00:22Z","updated_at":"2018-06-18T00:09:16Z","closed_at":"2018-06-18T00:00:44Z","author_association":"NONE","body":"NWJS Version : 0.31.2\r\nOperating System : Linux amd64\r\n\r\n### Expected behavior\r\n\r\nSuccessful compile module when using\r\nnwjc --nw-module lib.js lib.bin\r\n\r\n### Actual behavior\r\n\r\nsegmentation fault when using the above command\r\n\r\n### How to reproduce\r\n\r\nIf the module contains a dynamic import nwjc cannot compile it\r\n\r\nExample work correctly \r\nlib.js\r\n```\r\nexport function myfunction(mypath) {\r\n  console.log('this can be compiled without problem');\r\n}\r\n```\r\n\r\nThis fail to compile\r\nlib.js\r\n```\r\nexport function myfunction(mypath) {\r\n  console.log('this cannot be compiled');\r\n  import('dynamiclib.js').then((module) => {\r\n    console.log('module loaded');\r\n  }).catch((err) => {\r\n    console.log('module not loaded');\r\n  });\r\n}\r\n```\r\n\r\nThe code works perfectly without compile it. Only including import() make nwjc fail to compile.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/comments/397915812","html_url":"https://github.com/nwjs/nw.js/issues/6697#issuecomment-397915812","issue_url":"https://api.github.com/repos/nwjs/nw.js/issues/6697","id":397915812,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzkxNTgxMg==","user":{"login":"alxproject","id":40313249,"node_id":"MDQ6VXNlcjQwMzEzMjQ5","avatar_url":"https://avatars2.githubusercontent.com/u/40313249?v=4","gravatar_id":"","url":"https://api.github.com/users/alxproject","html_url":"https://github.com/alxproject","followers_url":"https://api.github.com/users/alxproject/followers","following_url":"https://api.github.com/users/alxproject/following{/other_user}","gists_url":"https://api.github.com/users/alxproject/gists{/gist_id}","starred_url":"https://api.github.com/users/alxproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxproject/subscriptions","organizations_url":"https://api.github.com/users/alxproject/orgs","repos_url":"https://api.github.com/users/alxproject/repos","events_url":"https://api.github.com/users/alxproject/events{/privacy}","received_events_url":"https://api.github.com/users/alxproject/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T00:09:16Z","updated_at":"2018-06-18T00:09:16Z","author_association":"NONE","body":"But, in my case, nwjc --nw-module works correctly, it can compile modules without problem, the only problem is when the module includes a dynamic import"}}
{"actor":{"display_login":"alxproject"}}