F
Firecrawl12mo ago
Joush

Issue building docker image for self-hosting

Hi, I'm following the documentation for self-hosting setup, but running into the following issue:
=> CANCELED [api build 1/4] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile 30.5s
=> ERROR [api prod-deps 1/1] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile 30.5s
------
> [api prod-deps 1/1] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile:
2.654 ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.12.2.tgz
29.84 ! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228.
29.84 ! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager
29.84
30.19 Lockfile is up to date, resolution step is skipped
30.24 Progress: resolved 1, reused 0, downloaded 0, added 0
30.35 Packages: +770
30.35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30.40  ERR_PNPM_READ_FROM_STORE  Unexpected end of JSON input
------
failed to solve: process "/bin/sh -c pnpm install --prod --frozen-lockfile" did not complete successfully: exit code: 1
=> CANCELED [api build 1/4] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile 30.5s
=> ERROR [api prod-deps 1/1] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile 30.5s
------
> [api prod-deps 1/1] RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile:
2.654 ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.12.2.tgz
29.84 ! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228.
29.84 ! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager
29.84
30.19 Lockfile is up to date, resolution step is skipped
30.24 Progress: resolved 1, reused 0, downloaded 0, added 0
30.35 Packages: +770
30.35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30.40  ERR_PNPM_READ_FROM_STORE  Unexpected end of JSON input
------
failed to solve: process "/bin/sh -c pnpm install --prod --frozen-lockfile" did not complete successfully: exit code: 1
I'm using basically all default configuration, no authentication or any of the optional settings or steps here. I just copied the .env from the docs. Thanks in advance!
3 Replies
Adobe.Flash
Adobe.Flash12mo ago
ccing @rafaelmiller here to help you out!
rafaelmiller
rafaelmiller12mo ago
Hi @Joush, sorry for the delay in getting back to you. The error ERR_PNPM_READ_FROM_STORE Unexpected end of JSON input occurs when pnpm encounters a corrupted cache, causing issues with reading package data. If you’re running this in Docker, try deleting all Firecrawl-related images and rebuild without cache. If you’re running services manually, clear the pnpm cache and try again.
Joush
JoushOP12mo ago
Thanks, I'll try this today and update here if I'm stuck Awesome - looks like the cache clear did the trick. I'd previously tried deleting builds and images but never cleared the cache 🤦‍♂️ . Thanks for the help!

Did you find this page helpful?