{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/7734","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/7734/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/7734/comments","events_url":"https://api.github.com/repos/electron/electron/issues/7734/events","html_url":"https://github.com/electron/electron/issues/7734","id":185153042,"number":7734,"title":"Electron cannot find module 'remote'","user":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-10-25T15:33:22Z","updated_at":"2016-10-26T09:23:43Z","closed_at":"2016-10-26T02:21:18Z","body":"Electron version: ^0.4.1 but have also tried versions above 1.0.0\r\nOperating system: Mac OSX\r\n\r\nNOTE: This project used to work fine about 6-8 months ago but due to updates with electron and neglecting the project, it no longer runs when completing an npm start. **However, it does build fine and the distributed version works fine (as a .app).** When building this project, i create a .package folder directory where all concatenated files live etc, so this is base root for developing and opening.\r\n\r\nWhen running npm start to start up my project I get an error of: \r\nangular.js:4526 Uncaught Error: [$injector:modulerr] Failed to instantiate module Mockster due to:\r\nError: Cannot find module 'remote'\r\n    at Module._resolveFilename (module.js:455:15)\r\n    at Function.Module._resolveFilename (/Users/daniel.potts/Documents/mockster/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)\r\n    at Function.Module._load (module.js:403:25)\r\n    at Module.require (module.js:483:17)\r\n    at require (internal/module.js:20:19)\r\n    at new <anonymous> (file:///Users/daniel.potts/Documents/mockster/.package/app/scripts/app.js:633:26)\r\n    at Object.instantiate (file:///Users/daniel.potts/Documents/mockster/.package/bower_components/angular/angular.js:4619:14)\r\n    at provider (file:///Users/daniel.potts/Documents/mockster/.package/bower_components/angular/angular.js:4433:36)\r\n    at Object.provider (file:///Users/daniel.potts/Documents/mockster/.package/bower_components/angular/angular.js:4425:16)\r\n    at runInvokeQueue (file:///Users/daniel.potts/Documents/mockster/.package/bower_components/angular/angular.js:4497:35)\r\nhttp://errors.angularjs.org/1.5.0/$injector/modulerr?p0=Mockster&p1=Error%3…Fmockster%2F.package%2Fbower_components%2Fangular%2Fangular.js%3A4497%3A35)\r\n\r\nMy package.json contains the following: \r\n{\r\n\"name\": \"example\",\r\n\"version\": \"1.0.0\",\r\n\"description\": \"for you github people\",\r\n\"main\": \"main.js\",\r\n\"node-main\": \"main.js\",\r\n\"scripts\": {\r\n\"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\r\n\"start\": \"electron .package/main.js\",\r\n\"build-mac\": \"electron-packager .package mockster --prune --ignore=node_modules/jshint --ignore=node.exe --out=.dist/osx --platform=darwin --arch=x64 --version=0.37.2\",\r\n\"build-win\": \"electron-packager .package mockster --prune --ignore=node_modules/jshint --out=.dist/win --platform=win32 --arch=x64 --version=0.37.2\",\r\n\"build\": \"npm run-script build-mac && npm run-script build-win\"\r\n},\r\n\"dependencies\": {\r\n\"angular\": \"^1.5.0\",\r\n\"angular-animate\": \"^1.5.0\",\r\n\"angular-aria\": \"^1.5.0\",\r\n\"angular-material\": \"^1.0.6\",\r\n\"angular-messages\": \"^1.5.0\",\r\n\"body-parser\": \"^1.14.2\",\r\n\"cors\": \"^2.7.1\",\r\n\"express\": \"~4.13.3\",\r\n\"fs\": \"0.0.2\",\r\n\"path\": \"^0.12.7\",\r\n\"portastic\": \"^1.0.1\",\r\n\"string-format\": \"^0.5.0\"\r\n},\r\n\"devDependencies\": {\r\n\"deep-equal\": \"~1.0.1\",\r\n\"del\": \"~2.2.0\",\r\n\"electron\": \"^0.4.1\",\r\n\"electron-builder\": \"~2.6.0\",\r\n\"electron-packager\": \"~5.2.1\",\r\n\"gulp\": \"~3.9.0\",\r\n\"gulp-concat\": \"~2.6.0\",\r\n\"gulp-imagemin\": \"~2.4.0\",\r\n\"gulp-inject\": \"^3.0.0\",\r\n\"gulp-jshint\": \"~2.0.0\",\r\n\"gulp-less\": \"~3.0.5\",\r\n\"gulp-livereload\": \"^3.8.1\",\r\n\"gulp-run\": \"^1.6.12\",\r\n\"gulp-shell\": \"~0.5.1\",\r\n\"gulp-watch\": \"~4.3.5\",\r\n\"jshint\": \"~2.9.1\",\r\n\"jshint-stylish\": \"^2.1.0\"\r\n}\r\n\r\nMy main.js looks like this:\r\n\r\n**(function () {\r\n    'use strict';\r\n    const electron = require('electron'),\r\n        app = electron.app;\r\n\r\n    var template = require('./menu-template'),\r\n        BrowserWindow = electron.BrowserWindow,\r\n        Menu = electron.menu,\r\n        mainWindow;\r\n\r\n    app.on('ready', function () {\r\n        var electronScreen = electron.screen,\r\n            size = electronScreen.getPrimaryDisplay().workAreaSize;\r\n\r\n        mainWindow = new BrowserWindow({\r\n            width: size.width,\r\n            height: size.height,\r\n            minWidth: 1325,\r\n            minHeight: 600\r\n        });\r\n        mainWindow.loadURL('file://' + __dirname + '/index.html');\r\n        mainWindow.openDevTools();\r\n        mainWindow.on('closed', function () {\r\n            mainWindow = null;\r\n            app.quit();\r\n        });\r\n\r\n        template = new template(app, mainWindow);\r\n    });\r\n\r\n    app.on('window-all-closed', function () {\r\n        if (process.platform !== 'darwin') {\r\n            mainWindow.webContents.executeJavaScript('stopServerOnClose()');\r\n            app.quit();\r\n        }\r\n    });\r\n})();\r\n\r\nI have tried uninstalling electron locally and globally. I have also tried the same for electron-prebuilt. I have tried updating my version of electron and have tried using remote to access the app/electron from the main.js.\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/256294528","html_url":"https://github.com/electron/electron/issues/7734#issuecomment-256294528","issue_url":"https://api.github.com/repos/electron/electron/issues/7734","id":256294528,"user":{"login":"danpottshimself","id":13645940,"avatar_url":"https://avatars.githubusercontent.com/u/13645940?v=3","gravatar_id":"","url":"https://api.github.com/users/danpottshimself","html_url":"https://github.com/danpottshimself","followers_url":"https://api.github.com/users/danpottshimself/followers","following_url":"https://api.github.com/users/danpottshimself/following{/other_user}","gists_url":"https://api.github.com/users/danpottshimself/gists{/gist_id}","starred_url":"https://api.github.com/users/danpottshimself/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpottshimself/subscriptions","organizations_url":"https://api.github.com/users/danpottshimself/orgs","repos_url":"https://api.github.com/users/danpottshimself/repos","events_url":"https://api.github.com/users/danpottshimself/events{/privacy}","received_events_url":"https://api.github.com/users/danpottshimself/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T09:23:42Z","updated_at":"2016-10-26T09:23:42Z","body":"@enlight sorry again but i now get this issue.\r\nI've uninstalled remote and its no longer in my node modules. I have changed the app/scripts/app.js require remote to require('electron').remote and I still get an error.\r\nangular.js:4526 Uncaught Error: [$injector:modulerr] Failed to instantiate module Mockster due to:\r\nError: Cannot find module 'remote'\r\n    at Module._resolveFilename (module.js:455:15)\r\n    at Function.Module._resolveFilename (/Users/daniel.potts/Documents/mockster/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)\r\n    at Function.Module._load (module.js:403:25)\r\n    at Module.require (module.js:483:17)\r\n    at require (internal/module.js:20:19)\r\n    at new <anonymous> "}}
{"actor":{"display_login":"danpottshimself"}}