Skip to content

Commit 0d33b38

Browse files
authored
Changedetection: Fix Browserless installation and update process (#8011)
* Fix the issue with changedetection.io install: > @browserless.io/[email protected] build:ts > tsc sh: 1: tsc: not found [ERROR] in line 70: exit code 0: while executing command $STD npm run build --prefix /opt/browserless * Just to verify the installation works * Just to verify the installation works * Try to fix typescript issues * Try to fix TypeScript issues and update NodeJS * Try to fix TypeScript issues * Add more missing npm dependencies * Cleanup test changes * Revert testing changes and change the way dependencies are installed * Revert testing changes and change the way dependencies are installed * Revert manually added TypeScript and esbuild packages and tried to install them from the optional requirements * Try the clean install * Fix the update script and revert testing changes * Added testing files again * Revert testing repos again
1 parent 11ae745 commit 0d33b38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ct/changedetection.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function update_script() {
5151
$STD git -C /opt/browserless/ fetch --all
5252
$STD git -C /opt/browserless/ reset --hard origin/main
5353
$STD npm update --prefix /opt/browserless
54+
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
5455
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
5556
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
5657
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome

install/changedetection-install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ msg_info "Installing Browserless & Playwright"
6262
mkdir /opt/browserless
6363
$STD python3 -m pip install playwright
6464
$STD git clone https://github.com/browserless/chrome /opt/browserless
65-
$STD npm install --prefix /opt/browserless --include=dev
66-
$STD npm install --prefix /opt/browserless typescript ts-node @types/node --save-dev
65+
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
6766
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
6867
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null
6968
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null

0 commit comments

Comments
 (0)