Skip to content

Commit

Permalink
Trying to fix chrome loader
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Jun 27, 2023
1 parent d3e4746 commit 68cdd2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ jobs:
cache: 'npm'
cache-dependency-path: package.json
- run: npm ci
# puppeteer-screen-recorder installs puppeteer by default, so we need to delete both
- run: npm uninstall puppeteer puppeteer-screen-recorder
# this will create fresh install in puppeteer-chromium
- run: npm install puppeteer
- run: chmod -R +x puppeteer-chromium
- run: npm install puppeteer-screen-recorder
# Moving puppeteer-chromium back to default cache folder
- run: npm install -g typescript
- run: tsc
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ COPY dist ${FUNCTION_DIR}/dist
COPY package.json ${FUNCTION_DIR}
COPY src ${FUNCTION_DIR}/src
COPY index.js ${FUNCTION_DIR}
COPY puppeteer.config.cjs ${FUNCTION_DIR}
COPY node_modules ${FUNCTION_DIR}/node_modules
COPY puppeteer-chromium ${FUNCTION_DIR}/puppeteer-chromium

RUN npm uninstall puppeteer puppeteer-screen-recorder
RUN npm install puppeteer
RUN chmod -R +x puppeteer-chromium
RUN npm install puppeteer-screen-recorder

WORKDIR ${FUNCTION_DIR}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const executablePath = (() => {
if (existsSync(winPath)) {
return winPath;
}
return join(root, first, "chrome-linux", "chrome");
return join(root, first, "chrome-linux64", "chrome");
})();

// const executablePath = "/usr/bin/chromium";
Expand Down

0 comments on commit 68cdd2b

Please sign in to comment.