我在这项法典上太长了,我无法指出,为什么我错了,这不是一个单元。
档案名称:网页.tsx
import Link from "next/link";
import SessionList from "./sessionList";
export default function Page() {
return (
<article>
<div className="flex justify-between items-center mb-3">
<h2 className="p-0 m-0">Session List</h2>
<Link href="/sessions/edit" className="bg-rr-green px-3 py-1 rounded-lg text-white">Add New</Link>
</div>
<SessionList />
</article>
)
}
这是一个由Tailwind、Austh0和MongoDB运行的下一个JS项目。 我正在使用Aus0作认证,在姐妹地点没有问题。 唯一的区别是,我把奥特0装在布局。 ts作为服务器组成部分。 我可以操作<代码>npm, dev, 申请工作罚款。 但是,当我努力建设时,我得到以下信息:
.next/types/app/sessions/edit/page.ts:2:24
Type error: File C:/Users/shane/workspaces/riverrail-admin/app/sessions/edit/page.tsx is not a module.
1 | // File: C:Usersshaneworkspaces
iverrail-adminappsessionseditpage.tsx
> 2 | import * as entry from ../../../../../app/sessions/edit/page.js
| ^
3 | import type { ResolvingMetadata, ResolvingViewport } from next/dist/lib/metadata/types/metadata-interface.js
4 |
5 | type TEntry = typeof import( ../../../../../app/sessions/edit/page.js )
我失踪了什么?
我已尝试去除盒子,删除所有节点模块,并重新安装<代码>npm >。 我看不到任何错误。
Here is my package.json file:
{
"name": "riverrail-admin",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@auth0/nextjs-auth0": "^3.5.0",
"@ckeditor/ckeditor5-alignment": "^41.3.1",
"@ckeditor/ckeditor5-build-classic": "^41.3.1",
"@ckeditor/ckeditor5-react": "^6.2.0",
"@vercel/analytics": "^1.2.2",
"html-react-parser": "^5.1.10",
"mongodb": "^6.5.0",
"next": "14.1.4",
"react": "^18",
"react-dom": "^18",
"react-icons": "^5.1.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.4",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}