Node.js电子预build错误无法find模块的“浏览器窗口”窗口10

现在我正试图学习如何使用电子来编程桌面应用程序,但是当我试图运行'npm start'时使用电子预编译与nodejs x32在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) 

这是我的代码:

的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 }) }) 

节点版本:4.4.5

npm版本:2.15.5

       

网上收集的解决方案 "Node.js电子预build错误无法find模块的“浏览器窗口”窗口10"