Uncaught Error: Cannot find module 'jquery'

后端 未结 6 554
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-01 08:45

I am using Electron to make a desktop app. In my app I am loading a an external site (outside Atom app) lets say http://mydummysite/index.html page.

Here is the stru

6条回答
  •  借酒劲吻你
    2020-12-01 09:31

    The same issue happened to me , a simple solution is to add this to your index.js file :

    app.on('ready', function() {
          var mainWindow = new BrowserWindow({
            "node-integration": false
          })
    //rest of your initialization code here.
    })
    

    the issue is caused by node , for more information please refer to this post

    Setting node-integration to false will disable node.js in the renderer process - i.e. your app can only do what a web browser will do.

提交回复
热议问题