Closed shari-sushi closed 10 months ago
〇本リポジトリで再現確認した。 ・docker関連ファイル削除 ・npx create-next-appのみ実施 ・npm run build, runでエラー
ーー結果ーーーー 0016でも見たwarnとエラー発生。startできず。 つまり、初期状態でも発生する。 ※このエラーは現在は0016では解消されている 原因はprerender-manifest.jsは生成されるが、.jsonが生成されていないこと。0016ではnextのリインストールで解消された。
> npm run build
> my-app@0.1.0 build
> next build
⚠ You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
▲ Next.js 14.0.2
✓ Creating an optimized production build
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (0/5)
Export encountered errors on following paths:
/_error: /404
/_error: /500
/_not-found
/page: /
> my-app@0.1.0 start
> next start
⚠ You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env
▲ Next.js 14.0.2
- Local: http://localhost:3000
[Error: ENOENT: no such file or directory, open 'C:\Users\略\test0015Next\my-app\.next\prerender-manifest.json'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\略\\test0015Next\\my-app\\.next\\prerender-manifest.json'```
この時点でリポジトリ0016ではnext run buildにエラーは発生せず、問題なくnext startできていた。
しかし、0016でnext, react, react-domを一度npm uninstallしてinstallし直したところ、本リポジトリと同様の症状になった。
なお、nextのバージョンは14.0.2と13.4.19のどちらでも同様の症状になる。
・リポジトリ0016 #64にて、特に何かをした覚えはないがNODE_ENVエラー解消した。 その時点では本リポジトリでは警告エラーが発生していた。
・後日、本リポジトリでnpm run build, npm startしたところ、エラー無く起動した。
よって、表面的には課題は解決した。
当初は本リポジトリと0016で同様の症状が見られたことから、PCやnodeに原因があると予想していた。 しかし、一時的に異なる症状が見られたため、そうとも言い切れなくなった。 エラーが出ていない現状ではどこに問題があるのか予測するのも難しいので、本isuueは締める。
my-app> npm run dev
> my-app@0.1.0 dev
> next dev
▲ Next.js 14.0.2
- Local: http://localhost:3000
- Environments: .env.development
バッチ ジョブを終了しますか (Y/N)?
^C
my-app> npm run build
> my-app@0.1.0 build
> next build
▲ Next.js 14.0.2
- Environments: .env.production
✓ Creating an optimized production build
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (5/5)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ○ / 5.16 kB 89.5 kB
└ ○ /_not-found 876 B 85.2 kB
+ First Load JS shared by all 84.4 kB
├ chunks/472-ebff5f4bdf87292b.js 29.2 kB
├ chunks/fd9d1056-5517b4ab1905cb09.js 53.3 kB
├ chunks/main-app-b7de0556a9e5f8d4.js 219 B
└ chunks/webpack-2f0f07802d1106cf.js 1.64 kB
○ (Static) prerendered as static content
\my-app> npm start
> my-app@0.1.0 start
> next start
▲ Next.js 14.0.2
- Local: http://localhost:3000
✓ Ready in 683ms
このリポジトリは、別のリポジトリ(0016)で解消できないトラブルがあり、再現性等確認の為立ち上げました。 ーーーーーーーーーーーーーー 0016にて以下のトラブル。 https://github.com/sharin-sushi/0016go_next_relation/issues/64
・node -v : v20.9.0 0015docker ・next ローカル:next@13.4.19 ・next グローバル : empty ・npm run dev:ブラウザで表示できる ・npm run build, start:ブラウザ表示できる。ただし② ①docker-compose upではnpm run buildに失敗する ②npm run build時にwarnが出る。 NODE_ENVがdevelopmentとして認識されてない? ーーーーーーーーーーーーーーー ①
②