Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 您可以使用带有browserify的Puppeter从常规浏览器运行start chromium吗?_Webpack_Requirejs_Browserify_Puppeteer - Fatal编程技术网

Webpack 您可以使用带有browserify的Puppeter从常规浏览器运行start chromium吗?

Webpack 您可以使用带有browserify的Puppeter从常规浏览器运行start chromium吗?,webpack,requirejs,browserify,puppeteer,Webpack,Requirejs,Browserify,Puppeteer,我正试着用普通浏览器中的按钮来运行木偶剧脚本。因此,我使用browserify打包了我的应用程序,这样我就可以在浏览器中使用require(“puppeter”),就像我们可以使用require()的其他模块一样 我通过在相关目录下的终端上运行“browserify main.js-o bundle.js”来实现这一点,就像我对其他browserify项目所做的那样。但是,对于Puppeter,在捆绑后运行脚本时,我会遇到以下错误: Uncaught (in promise) TypeError

我正试着用普通浏览器中的按钮来运行木偶剧脚本。因此,我使用browserify打包了我的应用程序,这样我就可以在浏览器中使用require(“puppeter”),就像我们可以使用require()的其他模块一样

我通过在相关目录下的终端上运行“browserify main.js-o bundle.js”来实现这一点,就像我对其他browserify项目所做的那样。但是,对于Puppeter,在捆绑后运行脚本时,我会遇到以下错误:

Uncaught (in promise) TypeError: Cannot read property 'bind' of undefined
at Object.52../helper (bundle.js:8800)
at o (bundle.js:1)
at bundle.js:1
at Object. (bundle.js:11817)
at Object.62../Browser (bundle.js:12161)
at o (bundle.js:1)
at bundle.js:1
at Object.68../BrowserFetcher (bundle.js:14534)
at o (bundle.js:1)
at bundle.js:1
你知道是什么引起的吗? 或者这是木偶演员和其他模块不可能做到的

您可以在此处找到非常简短的代码:


无法在浏览器中运行Puppeter-此软件包仅在节点环境中工作。您可以使用Puppeter设置后端,并通过浏览器向其发送请求。

Puppeter正在启动一个完整的Chromium,以使其正常工作。“您可以使用Puppeter设置后端,并通过浏览器向其发送请求。”听起来不错,您能详细说明一下如何做到这一点吗?