{"action":"closed","issue":{"url":"https://api.github.com/repos/electron-userland/electron-builder/issues/2747","repository_url":"https://api.github.com/repos/electron-userland/electron-builder","labels_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/2747/labels{/name}","comments_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/2747/comments","events_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/2747/events","html_url":"https://github.com/electron-userland/electron-builder/issues/2747","id":308678019,"number":2747,"title":"Error when using Nightmare.js ","user":{"login":"JonathanKolnik","id":1164060,"avatar_url":"https://avatars0.githubusercontent.com/u/1164060?v=4","gravatar_id":"","url":"https://api.github.com/users/JonathanKolnik","html_url":"https://github.com/JonathanKolnik","followers_url":"https://api.github.com/users/JonathanKolnik/followers","following_url":"https://api.github.com/users/JonathanKolnik/following{/other_user}","gists_url":"https://api.github.com/users/JonathanKolnik/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanKolnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanKolnik/subscriptions","organizations_url":"https://api.github.com/users/JonathanKolnik/orgs","repos_url":"https://api.github.com/users/JonathanKolnik/repos","events_url":"https://api.github.com/users/JonathanKolnik/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanKolnik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-26T18:07:16Z","updated_at":"2018-03-28T07:39:18Z","closed_at":"2018-03-28T07:39:18Z","author_association":"NONE","body":"<!-- Which version of electron-builder are you using? -->\r\n<!-- Please always try to use latest version before report. -->\r\n* **Version**: 19.55.3\r\n\r\n<!-- Which version of electron-updater are you using (if applicable)? -->\r\n\r\n<!-- What target are you building for? -->\r\n* **Target**: OSX 10.12.6\r\n\r\n<!-- Enter your issue details below this comment. -->\r\n<!-- If you want, you can donate to increase issue priority (https://www.electron.build/donate) -->\r\n\r\nHi I am trying to require Nightmare and call it from an action in my [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) app. \r\n\r\nI have made an example project [here](https://github.com/JonathanKolnik/nightmare-electron-react-boilerplate/commit/56e7eee321eac5e37e624ea1e7c3c9b9ad18e6c5)\r\n\r\nAs you can see the only changes I have made are adding `nightmare` to package.json\r\n\r\npackage.json https://github.com/JonathanKolnik/nightmare-electron-react-boilerplate/commit/56e7eee321eac5e37e624ea1e7c3c9b9ad18e6c5#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R194\r\n```\r\n\"nightmare\": \"^3.0.0\",\r\n```\r\n\r\nand requiring nightmare in my actions file.\r\n\r\napp/actions/counter.js https://github.com/JonathanKolnik/nightmare-electron-react-boilerplate/commit/56e7eee321eac5e37e624ea1e7c3c9b9ad18e6c5#diff-8d8cfdccbaf9609609d43684b5474d22R4\r\n``` \r\nvar Nightmare = require('nightmare');\r\n```\r\n\r\nUpon running my app locally, with `yarn run dev`, the error in the console is:\r\n\r\n```\r\nnightmare.js:332 Uncaught Error: Cannot find module \".\"\r\n    at webpackMissingModule (nightmare.js:332)\r\n    at Object.eval (nightmare.js:332)\r\n    at eval (nightmare.js:643)\r\n    at Object../node_modules/nightmare/lib/nightmare.js (renderer.dev.dll.js:598)\r\n    at __webpack_require__ (renderer.dev.dll.js:21)\r\n    at Object../node_modules/nightmare/lib/nightmare.js (nightmare.js from dll-reference renderer:1)\r\n    at __webpack_require__ (bootstrap d137ae8…:678)\r\n    at fn (bootstrap d137ae8…:88)\r\n    at Object.<anonymous> (counter.js:4)\r\n    at Object../app/actions/counter.js (renderer.dev.js:840)\r\n```\r\n![image](https://user-images.githubusercontent.com/1164060/37923911-5c454c62-30fe-11e8-8ac9-f9b459ce2020.png)\r\n\r\n\r\nI am new to electron development so I might be doing something fundamentally wrong by trying to execute nightmare from the actions file like this. I think this might be somewhat related to https://github.com/electron-userland/electron-builder/issues/1776 but I am not sure.\r\n\r\nI know that if I make a script tag in my index.html, I can run nightmare successfully from that file.\r\n\r\nActually I tried to use puppeteer and I got the same error so I'm not sure if it is particularly specific to that library or something I am missing with how to import/require.\r\n\r\nAny help would be greatly appreciate!\r\n"}}
{"actor":{"display_login":"develar"}}