Closed randomdudes closed 2 years ago
Trying running in dev mode yarn dev
and see if there is anything in the console.
Trying running in dev mode
yarn dev
and see if there is anything in the console.
Okay, I did that and now I have
umami_1 | $ next dev
umami_1 | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
umami_1 | info - Using webpack 4. Reason: custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
umami_1 | The static directory has been deprecated in favor of the public directory. https://nextjs.org/docs/messages/static-dir-deprecated
umami_1 | Error: > Couldn't find a pages
directory. Please create one under the project root
umami_1 | at findPagesDir (/app/node_modules/next/dist/lib/find-pages-dir.js:3:170)
umami_1 | at new DevServer (/app/node_modules/next/dist/server/next-dev-server.js:2:1761)
umami_1 | at NextServer.createServer (/app/node_modules/next/dist/server/next.js:1:2904)
umami_1 | at /app/node_modules/next/dist/server/next.js:1:3371
umami_1 | at async NextServer.prepare (/app/node_modules/next/dist/server/next.js:1:2679)
umami_1 | at async /app/node_modules/next/dist/cli/next-dev.js:22:1
umami_1 | error Command failed with exit code 1.
Error: > Couldn't find a pages directory. Please create one under the project root
Not sure what this error means. How is the pages directory missing from the repo?
I dont think anything is missing, but maybe some directories are not set up straight?:
Of course I use dockerfile (root is set as seen below from directory .next)
COPY --from=build /build/yarn.lock /build/package.json /build/next.config.js ./ COPY --from=build /build/.next . COPY --from=build /build/public ./public COPY --from=build /build/entrypoint.sh /app/entrypoint.sh
find / -name "pages"
umami_1 | /usr/local/lib/node_modules/npm/docs/src/pages
umami_1 | /app/static/chunks/pages
umami_1 | /app/node_modules/next/dist/pages
umami_1 | /app/node_modules/prisma/build/public/pages
umami_1 | /app/server/pages
ls -lah public/
umami_1 | total 352K
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:37 .
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:37 ..
umami_1 | -rw------- 1 node node 7.7K Oct 6 22:23 android-chrome-192x192.png
umami_1 | -rw------- 1 node node 22.2K Oct 6 22:23 android-chrome-512x512.png
umami_1 | -rw------- 1 node node 2.0K Oct 6 22:23 apple-touch-icon.png
umami_1 | -rw------- 1 node node 246 Oct 6 22:23 browserconfig.xml
umami_1 | drwx------ 1 node node 4.0K Oct 6 22:23 country
umami_1 | -rw------- 1 node node 246.7K Oct 6 22:23 datamaps.world.json
umami_1 | -rw------- 1 node node 597 Oct 6 22:23 favicon-16x16.png
umami_1 | -rw------- 1 node node 888 Oct 6 22:23 favicon-32x32.png
umami_1 | -rw------- 1 node node 14.7K Oct 6 22:23 favicon.ico
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:34 geo
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:34 lang
umami_1 | -rw------- 1 node node 2.9K Oct 6 22:23 mstile-150x150.png
umami_1 | -rw------- 1 node node 5.0K Oct 6 22:23 safari-pinned-tab.svg
umami_1 | -rw------- 1 node node 426 Oct 6 22:23 site.webmanifest
umami_1 | -rw-r--r-- 1 node node 2.5K Oct 14 10:34 umami.js
ls -lah server/
umami_1 | total 24K
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:35 .
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:37 ..
umami_1 | -rw-r--r-- 1 node node 2 Oct 14 10:35 font-manifest.json
umami_1 | drwxr-xr-x 1 node node 4.0K Oct 14 10:36 pages
umami_1 | -rw-r--r-- 1 node node 1.6K Oct 14 10:36 pages-manifest.json
umami_1 | -rw-r--r-- 1 node node 100 Oct 14 10:35 ssr-module-cache.js
yarn run dev
umami_1 | $ next dev
umami_1 | ready - started server on 0.0.0.0:3000, url: http://localhost:3000
umami_1 | info - Using webpack 4. Reason: custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
umami_1 | undefined
umami_1 | The static directory has been deprecated in favor of the public directory. https://nextjs.org/docs/messages/static-dir-deprecated
umami_1 | Error: > Couldn't find a pages
directory. Please create one under the project root
umami_1 | at findPagesDir (/app/node_modules/next/dist/lib/find-pages-dir.js:3:170)
umami_1 | at new DevServer (/app/node_modules/next/dist/server/next-dev-server.js:2:1761)
umami_1 | at NextServer.createServer (/app/node_modules/next/dist/server/next.js:1:2904)
umami_1 | at /app/node_modules/next/dist/server/next.js:1:3371
umami_1 | at async NextServer.prepare (/app/node_modules/next/dist/server/next.js:1:2679)
umami_1 | at async /app/node_modules/next/dist/cli/next-dev.js:22:1
umami_1 | error Command failed with exit code 1.
umami_1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
And no debug on information in console.log
It doesnt work with 1.23 and 1.22 and master branch