Skip to content

build 失败 #30

@luckypoem

Description

@luckypoem

hi.

~/blog-by-coderPerseus (main)$ pnpm build

lucky-snail-blog@0.1.0 build C:\Users\12799\blog-by-coderPerseus
next build

▲ Next.js 14.2.4

Creating an optimized production build ...
Warning: Contentlayer might not work as expected on Windows
Warning: Found 1 problems in 43 documents.

└── Invalid markdown in 1 documents. (Skipping documents)

 • "data/blog/post-26.mdx" failed with YAMLParseError: Unexpected scalar at node end at line 6, column 9:

 tags: []
         ^

Generated 42 documents in .contentlayer
(node:3056) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of C:\Users\12799\blog-by-coderPerseus\node_modules.pnpm@contentlayer+core@0.3.4_esbuild@0.23.1\node_modules@contentlayer\core\dist\generation\generate-dotpkg.js for build dependencies failed at 'import(filePathJoin(generatedPkgPath, 'generated', 'index.mjs'))'.
Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of C:\Users\12799\blog-by-coderPerseus\node_modules.pnpm@contentlayer+core@0.3.4_esbuild@0.23.1\node_modules@contentlayer\core\dist\generation\generate-dotpkg.js for build dependencies failed at 'import(filePathJoin(generatedPkgPath, 'generated', 'index.mjs'))'.
Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Parsing of C:\Users\12799\blog-by-coderPerseus\node_modules.pnpm@contentlayer+core@0.3.4_esbuild@0.23.1\node_modules@contentlayer\core\dist\generation\generate-dotpkg.js for build dependencies failed at 'import(filePathJoin(generatedPkgPath, 'generated', 'index.mjs'))'.
Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
⚠ Compiled with warnings

./node_modules/.pnpm/framer-motion@11.3.31_react-dom@18.3.1_react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs
Module not found: Can't resolve '@emotion/is-prop-valid' in 'C:\Users\12799\blog-by-coderPerseus\node_modules.pnpm\framer-motion@11.3.31_react-dom@18.3.1_react@18.3.1\node_modules\framer-motion\dist\es\render\dom\utils'

Import trace for requested module:
./node_modules/.pnpm/framer-motion@11.3.31_react-dom@18.3.1_react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs
./node_modules/.pnpm/framer-motion@11.3.31_react-dom@18.3.1_react@18.3.1/node_modules/framer-motion/dist/es/index.mjs
./src/app/not-found.tsx

Linting and checking validity of types .(node:19868) [ESLINT_PERSONAL_CONFIG_SUPPRESS] DeprecationWarning: '/.eslintrc.*' config files have been deprecated. Please remove it or add 'root:true' to the config files in your projects in order to avoid loading '/.eslintrc.*' accidentally. (found in "..\package.json")
(Use node --trace-deprecation ... to show where the warning was created)
✓ Linting and checking validity of types
Collecting page data ..❌ Invalid environment variables: {
NEXT_PUBLIC_SITE_URL: [ 'Required' ],
NEXT_PUBLIC_SITE_EMAIL_FROM: [ 'Required' ]
}
Error: Invalid environment variables
at 8232 (C:\Users\12799\blog-by-coderPerseus.next\server\chunks\206.js:16:1562)
at t (C:\Users\12799\blog-by-coderPerseus.next\server\webpack-runtime.js:1:128)
at 9636 (C:\Users\12799\blog-by-coderPerseus.next\server\app_not-found\page.js:1:1051)
at t (C:\Users\12799\blog-by-coderPerseus.next\server\webpack-runtime.js:1:128)
at r (C:\Users\12799\blog-by-coderPerseus.next\server\app_not-found\page.js:1:3914)
at C:\Users\12799\blog-by-coderPerseus.next\server\app_not-found\page.js:1:3948
at t.X (C:\Users\12799\blog-by-coderPerseus.next\server\webpack-runtime.js:1:1206)
at C:\Users\12799\blog-by-coderPerseus.next\server\app_not-found\page.js:1:3927
at Object. (C:\Users\12799\blog-by-coderPerseus.next\server\app_not-found\page.js:1:3975)
at Module._compile (node:internal/modules/cjs/loader:1546:14)

Build error occurred
Error: Failed to collect page data for /not-found
at C:\Users\12799\blog-by-coderPerseus\node_modules.pnpm\next@14.2.4
@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1\node_modules\next\dist\build\utils.js:1268:15
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
type: 'Error'
}
Collecting page data . ELIFECYCLE  Command failed with exit code 1.

12799@DESKTOP-B6LK9IO MINGW64 ~/blog-by-coderPerseus (main)
$

12799@DESKTOP-B6LK9IO MINGW64 ~/blog-by-coderPerseus (main)
$ ls
LICENSE lint-staged.config.ts posts/
README-zh_CN.md next-env.d.ts public/
README.md next.config.mjs scripts/
components.json node_modules/ src/
contentlayer.config.ts package.json tailwind.config.ts
data/ pnpm-lock.yaml tsconfig.json
env.mjs postcss.config.mjs

12799@DESKTOP-B6LK9IO MINGW64 ~/blog-by-coderPerseus (main)
$ find . -name index.html
./node_modules/.pnpm/@tailwindcss+forms@0.5.8_tailwindcss@3.4.10/node_modules/@tailwindcss/forms/index.html

12799@DESKTOP-B6LK9IO MINGW64 ~/blog-by-coderPerseus (main)
$

如何解决?谢谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions