-
-
Notifications
You must be signed in to change notification settings - Fork 641
Closed
Description
When I execuse building script, I got some Collecting page data like this:
info - Collecting page data ...[
{ params: { pageId: '500' } },
{ params: { pageId: '31cc504c078a4d23843fb9d0ae69c590' } },
]
and it throw some strange error:
> Build error occurred
[Error: ENOENT: no such file or directory, rename '/Users/xxx/nextjs-notion-starter-kit/.next/export/500.html' -> '/Users/xxx/nextjs-notion-starter-kit/.next/server/pages/500.html'] {
errno: -2,
code: 'ENOENT',
syscall: 'rename',
path: '/Users/xxx/nextjs-notion-starter-kit/.next/export/500.html',
dest: '/Users/xxx/nextjs-notion-starter-kit/.next/server/pages/500.html'
}
In notion-utils package, I found in src/get-canonical-page-id.ts
, It including the function:
export const normalizeTitle = (title: string | null): string => {
return (title || '')
.replace(/ /g, '-')
.replace(/[^a-zA-Z0-9-]/g, '')
.replace(/--/g, '-')
.replace(/-$/, '')
.replace(/^-/, '')
.trim()
.toLowerCase()
}
Because of this, it converting my pageId from rawPageTitle 星空 500 法则
to 500
.
Metadata
Metadata
Assignees
Labels
No labels