fix(reflex): fix app module path and npm registry | ApprovalToken: 1767140333
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- Export app from src/__init__.py so Reflex can find it - Set app_name to 'src' in rxconfig.py to match module structure - Remove .npmrc before setting npm registry to avoid mirror override - Add registry verification in Dockerfile - Fixes ModuleNotFoundError and npm registry issues
This commit is contained in:
@@ -61,11 +61,16 @@ RUN reflex init --loglevel debug || true && \
|
||||
RUN if [ -d "/build/.web" ] && [ -f "/build/.web/package.json" ]; then \
|
||||
echo "Found .web directory with package.json, building frontend..." && \
|
||||
cd /build/.web && \
|
||||
# Remove any existing .npmrc that might override registry
|
||||
rm -f .npmrc && \
|
||||
# Set npm registry to official registry
|
||||
npm config set registry https://registry.npmjs.org/ && \
|
||||
npm config set fetch-retry-mintimeout 20000 && \
|
||||
npm config set fetch-retry-maxtimeout 120000 && \
|
||||
npm config set fetch-retries 5 && \
|
||||
npm config set fetch-timeout 300000 && \
|
||||
# Verify registry is set correctly
|
||||
echo "Using npm registry: $(npm config get registry)" && \
|
||||
if [ -f "package-lock.json" ]; then \
|
||||
npm ci --prefer-offline --no-audit --loglevel verbose || \
|
||||
(echo "npm ci failed, retrying with npm install..." && npm install --prefer-offline --no-audit --loglevel verbose); \
|
||||
|
||||
Reference in New Issue
Block a user