right now i'm trying to learn how to program a desktop app using electron but I'm getting this error when trying to run 'npm start' using electron-prebuilt with nodejs x32 on windows 10 x64:
App threw an error during load Error: Cannot find module 'browser-window' at Module._resolveFilename (module.js:438:15) at Function.Module._resolveFilename (C:\Users\Alejandro\Documents\Proyectos\player\node_modules\electron-prebuilt\dist\resources\electron.asar\common\reset-search-paths.js:35:12) at Function.Module._load (module.js:386:25) at Module.require (module.js:466:17) at require (internal/module.js:20:19) at Object.<anonymous> (C:\Users\Alejandro\Documents\Proyectos\player\index.js:4:25) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:456:32) at tryModuleLoad (module.js:415:12) This is my code:
package.json
{ "name": "player", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "electron ." }, "author": "", "license": "ISC", "dependencies": {}, "devDependencies": { "electron-prebuilt": "^1.2.7" } } index.js
const electron = require('electron') const {app} = electron const {BrowserWindow} = require('browser-window') app.on('ready',function(){ var mainWindow = new BrowserWindow({ width:800, height:600 }) }) node version: 4.4.5
npm version: 2.15.5