Hyu-waseda / multi_language_bbs

0 stars 0 forks source link

[frontend]Warning:frontendのWarning対策 #19

Open Hyu-waseda opened 1 year ago

Hyu-waseda commented 1 year ago

okumurahyu@Hyu0530 multi_language_bbs % source backend/.venv/bin/activate (.venv) okumurahyu@Hyu0530 multi_language_bbs % docker-compose up [+] Running 2/0 ⠿ Container multi_language_bbs-backend-1 Created 0.0s ⠿ Container multi_language_bbs-frontend-1 Created 0.0s Attaching to multi_language_bbs-backend-1, multi_language_bbs-frontend-1 multi_language_bbs-backend-1 | INFO: Will watch for changes in these directories: ['/app'] multi_language_bbs-backend-1 | INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) multi_language_bbs-backend-1 | INFO: Started reloader process [1] using WatchFiles multi_language_bbs-frontend-1 | yarn run v1.22.19 multi_language_bbs-frontend-1 | $ next dev multi_language_bbs-backend-1 | INFO: Started server process [8] multi_language_bbs-backend-1 | INFO: Waiting for application startup. multi_language_bbs-backend-1 | INFO: Application startup complete. multi_language_bbs-frontend-1 | ready - started server on 0.0.0.0:3000, url: http://localhost:3000 multi_language_bbs-frontend-1 | info - Using wasm build of next-swc

multi_language_bbs-frontend-1 | warn - Attempted to load @next/swc-linux-x64-gnu, but it was not installed multi_language_bbs-frontend-1 | warn - Attempted to load @next/swc-linux-x64-gnux32, but it was not installed multi_language_bbs-frontend-1 | warn - Attempted to load @next/swc-linux-x64-musl, but it was not installed

multi_language_bbs-frontend-1 | event - compiled client and server successfully in 6.2s (171 modules) multi_language_bbs-frontend-1 | wait - compiling / (client and server)... multi_language_bbs-frontend-1 | event - compiled client and server successfully in 505 ms (174 modules)

Hyu-waseda commented 1 year ago

node_mocule/@next/のdarwinなんとかってフォルダを消したら解決 でもこれでいいのかは不明?

https://qiita.com/P-man_Brown/items/db1996bdee33ee667741

Hyu-waseda commented 1 year ago

ダメっぽい

Hyu-waseda commented 1 year ago

色々いじって動かなくなったけどこれで解決

okumurahyu@Hyu0530 frontend % rm -rf node_modules okumurahyu@Hyu0530 frontend % yarn install yarn install v1.22.19 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... ✨ Done in 115.99s. okumurahyu@Hyu0530 frontend % yarn dev yarn run v1.22.19 $ next dev ready - started server on 0.0.0.0:3000, url: http://localhost:3000 info - Loaded env from /Users/okumurahyu/github/multi_language_bbs/frontend/.env (node:30528) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use node --trace-warnings ... to show where the warning was created) event - compiled client and server successfully in 8.9s (1112 modules) ^C okumurahyu@Hyu0530 frontend % ^C okumurahyu@Hyu0530 frontend % docker-compose build

[+] Building 300.2s (20/20) FINISHED
=> [multi_language_bbs-backend internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [multi_language_bbs-frontend internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [multi_language_bbs-backend internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [multi_language_bbs-frontend internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [multi_language_bbs-backend internal] load metadata for docker.io/library/python:3.9-slim-buster 4.0s => [multi_language_bbs-frontend internal] load metadata for docker.io/library/node:18-alpine 3.9s => [multi_language_bbs-backend 1/5] FROM docker.io/library/python:3.9-slim-buster@sha256:6349688f3b8a1cfef5325a684b3b37aff40219424ca53f2b706220c0 0.0s => [multi_language_bbs-backend internal] load build context 0.1s => => transferring context: 38B 0.0s => [multi_language_bbs-frontend 1/6] FROM docker.io/library/node:18-alpine@sha256:f41850f74ff16a33daff988e2ea06ef8f5daeb6fb84913c7df09552a98caba0 0.0s => [multi_language_bbs-frontend internal] load build context 96.3s => => transferring context: 443.43MB 96.2s => CACHED [multi_language_bbs-backend 2/5] RUN apt-get update && apt-get install -y default-libmysqlclient-dev gcc 0.0s => CACHED [multi_language_bbs-backend 3/5] WORKDIR /app 0.0s => CACHED [multi_language_bbs-backend 4/5] COPY requirements.txt . 0.0s => CACHED [multi_language_bbs-backend 5/5] RUN pip install --upgrade -r requirements.txt 0.0s => [multi_language_bbs-frontend] exporting to image 16.4s => => exporting layers 16.3s => => writing image sha256:b7006f224d9f1f58137766acf078cf723551e63edf67ba936fe72bf7025d1288 0.0s => => naming to docker.io/library/multi_language_bbs-backend 0.0s => => writing image sha256:1cc30d007581768fed688859a3b255ff16aee7e90d679ebd25d12a7459433054 0.0s => => naming to docker.io/library/multi_language_bbs-frontend 0.0s => CACHED [multi_language_bbs-frontend 2/6] WORKDIR /app 0.0s => CACHED [multi_language_bbs-frontend 3/6] COPY package.json yarn.lock ./ 0.0s => CACHED [multi_language_bbs-frontend 4/6] RUN yarn install 0.0s => [multi_language_bbs-frontend 5/6] COPY . . 65.6s => [multi_language_bbs-frontend 6/6] RUN yarn build 117.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them okumurahyu@Hyu0530 frontend % rm -rf .next okumurahyu@Hyu0530 frontend % yarn build yarn run v1.22.19 $ next build info - Loaded env from /Users/okumurahyu/github/multi_language_bbs/frontend/.env info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully info - Collecting page data
info - Generating static pages (2/2) info - Finalizing page optimization

Route (pages) Size First Load JS ┌ λ / 7.11 kB 112 kB ├ /_app 0 B 105 kB ├ ○ /404 182 B 105 kB ├ λ /api/hello 0 B 105 kB └ λ /thread/[threadId] 83.7 kB 189 kB └ css/c7dfd905694337f7.css 239 B

λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) ○ (Static) automatically rendered as static HTML (uses no initial props)

✨ Done in 55.19s. okumurahyu@Hyu0530 frontend % cd ..
okumurahyu@Hyu0530 multi_language_bbs % docker-compose up

Hyu-waseda commented 1 year ago

上の時のエラー文

multi_language_bbs-frontend-1 | yarn run v1.22.19 multi_language_bbs-frontend-1 | $ next dev multi_language_bbs-frontend-1 | ready - started server on 0.0.0.0:3000, url: http://localhost:3000 multi_language_bbs-frontend-1 | info - Loaded env from /app/.env multi_language_bbs-frontend-1 | warn - Attempted to load @next/swc-linux-x64-gnu, but it was not installed multi_language_bbs-frontend-1 | warn - Attempted to load @next/swc-linux-x64-gnux32, but it was not installed multi_language_bbs-frontend-1 | warn - Attempted to load @next/swc-linux-x64-musl, but it was not installed multi_language_bbs-frontend-1 | error - Failed to load SWC binary for linux/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc multi_language_bbs-frontend-1 | error Command failed with exit code 1. multi_language_bbs-frontend-1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. multi_language_bbs-frontend-1 exited with code 1