Skip to content

fix: add missing npm install step in Dockerfile#140

Open
IIMFINE wants to merge 1 commit into
cv-cat:masterfrom
IIMFINE:fix/dockerfile-npm-install
Open

fix: add missing npm install step in Dockerfile#140
IIMFINE wants to merge 1 commit into
cv-cat:masterfrom
IIMFINE:fix/dockerfile-npm-install

Conversation

@IIMFINE

@IIMFINE IIMFINE commented Mar 13, 2026

Copy link
Copy Markdown

Problem

The Dockerfile is missing the npm install step. This causes a runtime error:

Error: Cannot find module 'crypto-js'

The Node.js dependencies (crypto-js, jsdom) defined in package.json are never installed during the Docker build, so the XHS signature calculation fails at runtime.

Fix

Added COPY package.json package-lock.json and RUN npm install --production before the final COPY . . step, following Docker layer caching best practices.

Testing

  • Built the image and verified the container runs successfully with all three tasks (note scraping, user scraping, keyword search) completing without errors.

The Dockerfile was missing the npm install step, causing 'Cannot find module
crypto-js' error at runtime. This adds package.json and package-lock.json copy
and runs npm install before copying the rest of the application files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant