crossfeed
crossfeed copied to clipboard
Cannot run local services in Apple M1
🐛 Summary
Following the quickstart document (https://docs.crossfeed.cyber.dhs.gov/dev/quickstart/) for running the service locally, I executed npm run build worker
; but, results indicate Chromium binary is required for the arm64 MacBook Pro and thus, could not run the service locally.
Please refer to my local environment and logs.
> [build 4/8] RUN npm ci:
#19 17.52 npm WARN lifecycle [email protected]~preinstall: cannot run in wd [email protected] npx npm-force-resolutions (wd=/app)
#19 17.55
#19 17.55 > [email protected] install /app/node_modules/puppeteer
#19 17.55 > node install.js
#19 17.55
#19 17.62 The chromium binary is not available for arm64:
#19 17.62 If you are on Ubuntu, you can install with:
#19 17.62
#19 17.62 apt-get install chromium-browser
#19 17.62
#19 17.62 /app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112
#19 17.62 throw new Error();
#19 17.62 ^
#19 17.62
#19 17.62 Error
#19 17.62 at /app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112:19
#19 17.62 at FSReqCallback.oncomplete (fs.js:192:21)
#19 17.63 npm ERR! code ELIFECYCLE
#19 17.63 npm ERR! errno 1
#19 17.63 npm ERR! [email protected] install: `node install.js`
#19 17.63 npm ERR! Exit status 1
#19 17.63 npm ERR!
#19 17.63 npm ERR! Failed at the [email protected] install script.
#19 17.63 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#19 17.65
#19 17.65 npm ERR! A complete log of this run can be found in:
#19 17.65 npm ERR! /root/.npm/_logs/2021-09-25T17_46_29_787Z-debug.log
------
executor failed running [/bin/sh -c npm ci]: exit code: 1
To reproduce
- Clone https://github.com/cisagov/crossfeed
- cp dev.env.example .env
- cd backend && npm run build-worker
Expected behavior
-
npm run build-worker
completes without any errors.
Any helpful log output or screenshots
Paste the results here:
=> [deps 1/7] FROM docker.io/library/golang:1.14.6-buster@sha256:b2a74bfbbe9b01536c2a3e0429060d90e37d99534f47ce48ecd38382a5c4c982 0.0s
=> CACHED [deps 2/7] WORKDIR /app 0.0s
=> CACHED [deps 3/7] RUN apt-get update && apt-get install -y wget unzip ca-certificates && rm -rf /var/lib/apt/lists/* 0.0s
=> CACHED [deps 4/7] RUN wget --quiet https://github.com/Edu4rdSHL/findomain/releases/download/1.7.0/findomain-linux -O /usr/bin/findomain && chmod +x /usr/b 0.0s
=> CACHED [deps 5/7] RUN wget --quiet https://github.com/OWASP/Amass/releases/download/v3.7.3/amass_linux_i386.zip -O amass.zip && unzip -q amass.zip && cp a 0.0s
=> CACHED [deps 6/7] RUN go mod init crossfeed-worker 0.0s
=> CACHED [deps 7/7] RUN go get github.com/facebookincubator/nvdtools/[email protected] 0.0s
=> CACHED [build 2/8] WORKDIR /app 0.0s
=> [stage-2 3/15] RUN apt-get update && apt-get install -y curl git bzip2 build-essential libssl-dev libreadline-dev zlib1g-dev lib 16.5s
=> CACHED [build 3/8] COPY ./package* ./ 0.0s
=> ERROR [build 4/8] RUN npm ci 17.7s
=> CANCELED [stage-2 4/15] RUN curl -O https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz && tar -xf Python-3.8.10.tar.xz && cd Python-3.8.10 1.3s
------
> [build 4/8] RUN npm ci:
#19 17.52 npm WARN lifecycle [email protected]~preinstall: cannot run in wd [email protected] npx npm-force-resolutions (wd=/app)
#19 17.55
#19 17.55 > [email protected] install /app/node_modules/puppeteer
#19 17.55 > node install.js
#19 17.55
#19 17.62 The chromium binary is not available for arm64:
#19 17.62 If you are on Ubuntu, you can install with:
#19 17.62
#19 17.62 apt-get install chromium-browser
#19 17.62
#19 17.62 /app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112
#19 17.62 throw new Error();
#19 17.62 ^
#19 17.62
#19 17.62 Error
#19 17.62 at /app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:112:19
#19 17.62 at FSReqCallback.oncomplete (fs.js:192:21)
#19 17.63 npm ERR! code ELIFECYCLE
#19 17.63 npm ERR! errno 1
#19 17.63 npm ERR! [email protected] install: `node install.js`
#19 17.63 npm ERR! Exit status 1
#19 17.63 npm ERR!
#19 17.63 npm ERR! Failed at the [email protected] install script.
#19 17.63 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#19 17.65
#19 17.65 npm ERR! A complete log of this run can be found in:
#19 17.65 npm ERR! /root/.npm/_logs/2021-09-25T17_46_29_787Z-debug.log
------
executor failed running [/bin/sh -c npm ci]: exit code: 1
Add any screenshots of the problem here.
We don't support arm64 at the moment. Do you want to try adding apt-get install chromium-browser
to the worker dockerfile and see if that fixes the issue? And if so, maybe you could make a PR that fixes this?
@epicfaace Thanks. Sure, why not. Let me try it out.