screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

build failed

Open shawnWXN opened this issue 2 months ago • 3 comments

Describe the bug Docker container Exited for screenshot-to-code-main-frontend-1

To Reproduce OS: Ubuntu 22.04.4 LTS Docker Compose version v2.28.1 Build version: (commit id) b9076120dc7f610ae4c9d0fdb2b3fbea39f371f1

Screenshots of backend AND frontend terminal logs Nginx conf

        location /screenshot {
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_send_timeout 1000;
                proxy_read_timeout 1000;
                send_timeout 1000;
                client_max_body_size 5M;
                proxy_pass http://127.0.0.1:5173;
        }
~ docker logs --tail 444 screenshot-to-code-main-frontend-1
yarn run v1.22.22
$ vite --host 0.0.0.0

  VITE v4.5.0  ready in 1390 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: http://172.20.0.3:5173/

 ERROR 
[TypeScript] Found 0 errors. Watching for file changes.


 WARN  Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

file:///app/tailwind.config.js:2
module.exports = {
^

ReferenceError: module is not defined
    at file:///app/tailwind.config.js:2:1
    at ModuleJobSync.runSync (node:internal/modules/esm/module_job:395:35)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
    at Module._compile (node:internal/modules/cjs/loader:1547:5)
    at Object..js (node:internal/modules/cjs/loader:1677:16)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:138:16)
    at /app/node_modules/tailwindcss/lib/lib/load-config.js:35:27
    at loadConfig (/app/node_modules/tailwindcss/lib/lib/load-config.js:39:6)
    at getTailwindConfig (/app/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:71:116)
    at /app/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:100:92
    at /app/node_modules/tailwindcss/lib/processTailwindFeatures.js:48:11
    at plugins (/app/node_modules/tailwindcss/lib/plugin.js:38:69)
    at LazyResult.runOnRoot (/app/node_modules/postcss/lib/lazy-result.js:329:16)
    at LazyResult.runAsync (/app/node_modules/postcss/lib/lazy-result.js:258:26)
    at LazyResult.async (/app/node_modules/postcss/lib/lazy-result.js:160:30)
    at LazyResult.then (/app/node_modules/postcss/lib/lazy-result.js:404:17)

Node.js v22.12.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

image

shawnWXN avatar Dec 06 '24 05:12 shawnWXN