Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run dev 启动会报错 #18

Closed
lmuiotctf opened this issue Mar 24, 2023 · 5 comments
Closed

npm run dev 启动会报错 #18

lmuiotctf opened this issue Mar 24, 2023 · 5 comments

Comments

@lmuiotctf
Copy link

chatgpt-next-web@1.1 dev
cross-env COMMIT_ID=$(git rev-parse --short HEAD) next dev

'rev-parse' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
node:events:491
throw er; // Unhandled 'error' event
^

Error: spawn rev-parse ENOENT
at notFoundError (C:\Users\里面\Desktop\biye\ChatGPT-Next-Web\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\里面\Desktop\biye\ChatGPT-Next-Web\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\里面\Desktop\biye\ChatGPT-Next-Web\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Users\里面\Desktop\biye\ChatGPT-Next-Web\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn rev-parse',
path: 'rev-parse',
spawnargs: [ '--short', 'HEAD)', 'next', 'dev' ]

@Yidadaa
Copy link
Collaborator

Yidadaa commented Mar 24, 2023

请先 npm install。

推荐使用 yarn:

yarn install && yarn dev

@lmuiotctf
Copy link
Author

目前成功启动了,但是界面会报错
image
image

@lmuiotctf
Copy link
Author

作者建议新增一个输入密码访问此站,防止太多人用

@Yidadaa
Copy link
Collaborator

Yidadaa commented Mar 24, 2023

报错是预期内行为,是由于 nextjs 服务端预渲染出文本与页面状态不一致导致的,不影响正常开发,所以就一直没修。

加密码的功能之后会做,你现在可以使用其他权限控制手段限制访问,详细的可以问问 chatgpt,它懂得比我多。

@Yidadaa Yidadaa closed this as completed Mar 24, 2023
@lmuiotctf
Copy link
Author

对的,目前存在报错,但是正常访问使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants