chanshiyucx / zero

Nya~
https://chanshiyu.com
78 stars 17 forks source link

Failed to compile #4

Open o0v0 opened 8 months ago

o0v0 commented 8 months ago

Failed to compile ./app/page.tsx:8:0 Module not found: Package path ./generated is not exported from package D:\boke\zero\node_modules\contentlayer (see exports field in D:\boke\zero\node_modules\contentlayer\package.json) 6 | import AOS from 'aos' 7 | import clsx from 'clsx'

8 | import { allPosts } from 'contentlayer/generated' 9 | import { compareDesc, format } from 'date-fns' 10 | import { Bookmark, Calendar, Tag } from 'lucide-react' 11 | import { useRouter } from 'next/navigation'

https://nextjs.org/docs/messages/module-not-found This error occurred during the build process and can only be dismissed by fixing the error.

瞧瞧看我使用 npm run dev 得到了什么内容

o0v0 commented 8 months ago

D:\boke\zero>npm run dev

zzz@1.0.0 dev next dev

Warning: Contentlayer might not work as expected on Windows ConfigReadError (D:\boke\zero\contentlayer.config.ts): Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'shiki' imported from D:\boke\zero\node_modules\rehype-pretty-code\dist\rehype-pretty-code.js ConfigReadError (D:\boke\zero\contentlayer.config.ts): Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'shiki' imported from D:\boke\zero\node_modules\rehype-pretty-code\dist\rehype-pretty-code.js ▲ Next.js 13.5.6

https://nextjs.org/docs/messages/module-not-found

[webpack.cache.PackFileCacheStrategy] Restoring pack failed from D:\boke\zero\.next\cache\webpack\client-development-fallback.pack.gz: Error: incorrect header check [webpack.cache.PackFileCacheStrategy] Restoring pack failed from D:\boke\zero\.next\cache\webpack\client-development-fallback.pack.gz: Error: incorrect header check
o0v0 commented 8 months ago

D:\boke\zero>npm start

zzz@1.0.0 start next start

[Error: ENOENT: no such file or directory, open 'D:\boke\zero.next\BUILD_ID'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'D:\boke\zero\.next\BUILD_ID' }

D:\boke\zero>