Replies: 1 comment
-
Please create minimum reproducible test repo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
module.exports = { mode: 'production', entry: './lib/javascript/puppeteer.js', target: 'node', externals: 'typescript', output: { path: process.cwd(), filename: 'bundle.js', }, };
Error I am getting
`ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js
Module not found: Error: Can't resolve 'puppeteer-core/internal/node/PuppeteerNode.js' in '/home/nabin/Desktop/work/mindgym-diagnostics/node_modules/puppeteer/lib/cjs/puppeteer'
@ ./node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js 24:27-83
@ ./lib/javascript/puppeteer.js
ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js
Module not found: Error: Can't resolve 'puppeteer-core/internal/puppeteer-core.js' in '/home/nabin/Desktop/work/mindgym-diagnostics/node_modules/puppeteer/lib/cjs/puppeteer'
@ ./node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js 23:13-65
@ ./lib/javascript/puppeteer.js
ERROR in ./node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js 47:65
Module parse failed: Unexpected token (47:65)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }).search();
| const configuration = result ? result.config : {};
| process.env['npm_config_LOGLEVEL'] ??
| process.env['npm_package_config_LOGLEVEL'] ??
@ ./node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js 25:30-62
@ ./lib/javascript/puppeteer.js
`
Other relevant information:
webpack version: 4.46.0
Node.js version: 18.19.1
Operating System: Ubunut 22.04
Additional tools: Pupeteer 22.6.3
The puppeteer works fine when not built with webpack . When i try to build it I get the above error. Thanks
Beta Was this translation helpful? Give feedback.
All reactions