Closed nicojs closed 3 months ago
Hi @nicojs, I remember some issues with npm install
and package-lock.json
, which led to changing to using npm-shrinkwrap.json
: https://github.com/astefanutti/decktape/issues/136#issuecomment-392725841.
We can certainly re-assess what's the best option.
@astefanutti what is the process of installing decktape properly? I don't think decktape installs puppeteer.... Do we have to manually install puppeteer globally?
Error: Could not find Chrome (ver. 115.0.5790.98). This can occur if either
1. you did not perform an installation before running the script (e.g. `npm install`) or
2. your cache path is incorrectly configured (which is: /home/ubuntu/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at ChromeLauncher.resolveExecutablePath (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:274:27)
at ChromeLauncher.executablePath (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:174:25)
at ChromeLauncher.computeLaunchArguments (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:91:37)
at async ChromeLauncher.launch (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:53:28)
at async file:///usr/lib/node_modules/decktape/decktape.js:254:19
@0xDevrim Chrome is supposed to be installed by Puppeteer when Decktape is installed, e.g., with npm install -g decktape
. The Puppeteer runs a post-install script that downloads Chrome and installs it in the cache.
What's the output when you run npm install -g decktape
?
@0xDevrim Chrome is supposed to be installed by Puppeteer when Decktape is installed, e.g., with
npm install -g decktape
. The Puppeteer runs a post-install script that downloads Chrome and installs it in the cache.What's the output when you run
npm install -g decktape
?
I don't manage the server myself but I just asked the host to update decktape and send me the output. I will edit this reply with the output if I still have the same issue.
@astefanutti got the same issue again.
Error: Could not find Chrome (ver. 126.0.6478.126). This can occur if either
1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or
2. your cache path is incorrectly configured (which is: /home/prod_thumbnail/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at ChromeLauncher.resolveExecutablePath (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:269:27)
at ChromeLauncher.executablePath (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:203:25)
at ChromeLauncher.computeLaunchArguments (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:83:37)
at async ChromeLauncher.launch (file:///usr/lib/node_modules/decktape/node_modules/puppeteer-core/lib/esm/puppeteer/node/ProductLauncher.js:44:28)
at async file:///usr/lib/node_modules/decktape/decktape.js:254:19
Log:
root@prod-wkr-a:~# npm install -g decktape
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'decktape@3.13.0',
npm WARN EBADENGINE required: { node: '>=18' },
npm WARN EBADENGINE current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
added 21 packages, removed 9 packages, changed 113 packages, and audited
135 packages in 2s
11 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
root@prod-wkr-a:~# decktape version
3.13.0
I've noticed that the dependencies of decktape are never hoisted.
For example:
This is a problem when you later install a version of puppeteer yourself, it gets duplicated in your node_modules:
... which is a problem, because installing 2 versions of puppeteer simultaneously doesn't seem to work:
I'm reasonably sure this hoisting behavior is caused by the npm-shrinkwrap.json file. Is this file there by choice? Or can we change it to a
package-lock.json
file?