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

[Bug]: 按照官网,无法在vercel部署成功 500错误 #1334

Closed
hxer520 opened this issue Aug 29, 2022 · 31 comments
Closed

[Bug]: 按照官网,无法在vercel部署成功 500错误 #1334

hxer520 opened this issue Aug 29, 2022 · 31 comments
Labels
bug Something isn't working

Comments

@hxer520
Copy link

hxer520 commented Aug 29, 2022

问题描述 | Describe the bug

image

按照官网,无法在vercel部署成功 500错误

问题网站 | Website URL

https://waline-vercel-self.vercel.app/

服务部署在哪里? | Where your waline deploy?

Vercel (Default)

数据存储在哪里?| Where your comment data store?

LeanCloud(https://leancloud.cn)

@hxer520 hxer520 added the bug Something isn't working label Aug 29, 2022
@Mister-Hope
Copy link
Member

Are you setting env variables and rebooting the service later?

@lizheming
Copy link
Collaborator

去后台截图看下日志吧

@idelin
Copy link

idelin commented Aug 30, 2022

[GET] /
16:41:09:94
2022-08-30T08:41:10.638Z undefined ERROR Cannot find module 'think-model-mysql'
Require stack:

  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T08:41:10.639Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: 06741271-085d-4738-9fa9-c8ad117b2e67 Error: Runtime exited with error: exit status 1
    Runtime.ExitError

@idelin
Copy link

idelin commented Aug 30, 2022

确实也不行,我是之前部署的,之前是好的,今天去重新 redeloy了一下,就不行了,前台显示跟这一样,后台报错显示这个

@CCKNBC
Copy link

CCKNBC commented Aug 30, 2022

加一 昨晚更改了环境变量 重新部署就这样了

@hxer520
Copy link
Author

hxer520 commented Aug 30, 2022

Are you setting env variables and rebooting the service later?
sure

@hxer520 hxer520 changed the title [Bug]: [Bug]: 按照官网,无法在vercel部署成功 500错误 Aug 30, 2022
@hxer520
Copy link
Author

hxer520 commented Aug 30, 2022

去后台截图看下日志吧
@lizheming 我日志的情况
@idelin 和她的一样

@hxer520
Copy link
Author

hxer520 commented Aug 30, 2022

这个事构建日志:
[21:31:15.473] Cloning github.com/hxer520/waline-vercel (Branch: main, Commit: 83ef7ef)
[21:31:15.995] Cloning completed: 522.145ms
[21:31:16.741] No Build Cache available
[21:31:16.965] Running "vercel build"
[21:31:17.511] Vercel CLI 28.2.0
[21:31:17.605] WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
[21:31:18.128] Installing dependencies...
[21:31:18.475] yarn install v1.22.17
[21:31:18.504] info No lockfile found.
[21:31:18.509] [1/4] Resolving packages...
[21:31:19.939] warning @waline/vercel > akismet > [email protected]: request has been deprecated, see request/request#3142
[21:31:19.939] warning @waline/vercel > @cloudbase/node-sdk > [email protected]: request has been deprecated, see request/request#3142
[21:31:20.271] warning @waline/vercel > leancloud-storage > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[21:31:20.272] warning @waline/vercel > think-helper > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[21:31:20.272] warning @waline/vercel > akismet > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[21:31:20.272] warning @waline/vercel > leancloud-storage > leancloud-realtime > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[21:31:20.801] warning @waline/vercel > @cloudbase/node-sdk > [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see request/request#3142
[21:31:21.624] warning @waline/vercel > akismet > request > [email protected]: this library is no longer supported
[21:31:22.611] warning @waline/vercel > thinkjs > think-payload > [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
[21:31:22.840] warning @waline/vercel > @cloudbase/node-sdk > @cloudbase/signature-nodejs > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[21:31:22.938] warning @waline/vercel > leancloud-storage > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > [email protected]: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases.
[21:31:22.941] warning @waline/vercel > leancloud-storage > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent > [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
[21:31:23.861] [2/4] Fetching packages...
[21:31:31.292] [3/4] Linking dependencies...
[21:31:31.294] warning "@waline/vercel > @cloudbase/node-sdk > [email protected]" has unmet peer dependency "typescript@>=2.7".
[21:31:37.233] [4/4] Building fresh packages...
[21:31:38.019] success Saved lockfile.
[21:31:38.023] Done in 19.55s.
[21:31:40.081] Build Completed in /vercel/output [22s]
[21:31:44.281] Generated build outputs:
[21:31:44.281] - Static files: 0
[21:31:44.281] - Serverless Functions: 1
[21:31:44.281] - Edge Functions: 0
[21:31:44.281] Serverless regions: Washington, D.C., USA
[21:31:44.281] Deployed outputs in 3s
[21:31:45.667] Build completed. Populating build cache...
[21:31:55.076] Uploading build cache [34.66 MB]...
[21:31:56.475] Build cache uploaded: 1.399s
[21:31:56.509] Done with "."

@hxer520
Copy link
Author

hxer520 commented Aug 30, 2022

以下这个是log

[GET] /
21:31:47:09
2022-08-30T13:31:48.183Z undefined ERROR Cannot find module 'think-model-mysql'
Require stack:

  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T13:31:48.183Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: b3cf373f-2e46-47be-9525-14bd10dc0f15 Error: Runtime exited with error: exit status 1
    Runtime.ExitError
    [GET] /
    21:31:46:80
    2022-08-30T13:31:47.578Z undefined ERROR Cannot find module 'think-model-mysql'
    Require stack:
  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T13:31:47.587Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: 07dd99d1-9199-4430-8d2f-6981ac477d7a Error: Runtime exited with error: exit status 1
    Runtime.ExitError
    [GET] /
    21:31:46:64
    2022-08-30T13:31:48.010Z undefined ERROR Cannot find module 'think-model-mysql'
    Require stack:
  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T13:31:48.010Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: 21c9242b-21ba-4f41-88b6-100a10423323 Error: Runtime exited with error: exit status 1
    Runtime.ExitError
    [GET] /
    21:31:46:45
    2022-08-30T13:31:47.875Z undefined ERROR Cannot find module 'think-model-mysql'
    Require stack:
  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T13:31:47.875Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: 2cea3bf5-3744-48b2-9075-7091d0b66f66 Error: Runtime exited with error: exit status 1
    Runtime.ExitError
    [GET] /
    21:31:46:31
    2022-08-30T13:31:47.708Z undefined ERROR Cannot find module 'think-model-mysql'
    Require stack:
  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T13:31:47.708Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: 0ad7ff3d-99fb-47d9-ae20-6a86503e5bd9 Error: Runtime exited with error: exit status 1
    Runtime.ExitError
    [GET] /
    21:31:45:47
    2022-08-30T13:31:46.867Z undefined ERROR Cannot find module 'think-model-mysql'
    Require stack:
  • /var/task/node_modules/@waline/vercel/src/config/adapter.js
  • /var/task/node_modules/think-loader/loader/config.js
  • /var/task/node_modules/think-loader/index.js
  • /var/task/node_modules/thinkjs/lib/loader.js
  • /var/task/node_modules/thinkjs/lib/application.js
  • /var/task/node_modules/@waline/vercel/index.js
  • /var/task/index.js
    2022-08-30T13:31:46.867Z undefined ERROR Did you forget to add it to "dependencies" in package.json?
    RequestId: c2cc68bd-b644-4380-9db5-fe1c4f24d0a6 Error: Runtime exited with error: exit status 1
    Runtime.ExitError

@Ran-Xing
Copy link

+1

@cppxiaozhu
Copy link

me too

@qinyuanpei
Copy link

I try to add think-model-mysql to the package.json, but it is useless.

@fanke15
Copy link

fanke15 commented Aug 31, 2022

undefined ERROR Cannot find module 'think-model-mysql'

一样的报错。
昨天按照官网文档配置,国内,四个环境变量全部设置。
重试了三次。

截屏2022-08-31 11 50 16

docker实测运行正常

@JokerZhang66
Copy link

+1

@lizheming
Copy link
Collaborator

vercel/vercel#8494 Waline 这边排查不太出来了,给 Vercel 提 discussion 了,等回复中

@Vincentqyw
Copy link

same issue, waiting for a solution.

@idelin
Copy link

idelin commented Sep 1, 2022

vercel/vercel#8494 Waline 这边排查不太出来了,给 Vercel 提 discussion 了,等回复中

回复了,怎么说

image

@lizheming
Copy link
Collaborator

有问题的同学重新部署一下,应该是 @vercel/node 新版引入的 Bug,目前指定到老版本可以正常部署。

@elkan1788
Copy link

有问题的同学重新部署一下,应该是 @vercel/node 新版引入的 Bug,目前指定到老版本可以正常部署。

指定到哪个老版本呢?测试过1.18.x1.17.x都不行哦

@qinyuanpei
Copy link

请修改你的 vercel.json 文件,并将 @vercel/node 回退到上一个版本,可以通过命令 npm view @vercel/node versions 查看

{
  "name": "comment",
  "github": {
    "silent": true
  },
  "builds": [
    {
      "src": "index.js",
      "use": "@vercel/[email protected]"
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "index.js"
    }
  ]
}

重新部署后即可恢复,万万没想到是 Vercel 出现了问题

图片

@lizheming
Copy link
Collaborator

有问题的同学重新部署一下,应该是 @vercel/node 新版引入的 Bug,目前指定到老版本可以正常部署。

指定到哪个老版本呢?测试过1.18.x1.17.x都不行哦

看清楚是 @verce/node 不是 @waline/vercel,已经部署的同学可以参考 8c947a7 这个 commit 修改(其实就是加了个版本号

@lizheming lizheming pinned this issue Sep 2, 2022
@Ran-Xing
Copy link

Ran-Xing commented Sep 2, 2022

@lizheming 大佬,能否指教下fock仓库之后怎么直接部署?
我在vercel里面设置npm run server:dev会报错,
为什么fork呢?方便及时更新最新版

@CCKNBC
Copy link

CCKNBC commented Sep 2, 2022

@lizheming 大佬,能否指教下fock仓库之后怎么直接部署? 我在vercel里面设置npm run server:dev会报错, 为什么fork呢?方便及时更新最新版

https://vercel.com/import/project?template=https://github.com/Ran-Xing/waline/tree/main/example

@Ran-Xing
Copy link

Ran-Xing commented Sep 2, 2022

image
我说的是这个,抱歉 @CCKNBC

@Ran-Xing
Copy link

Ran-Xing commented Sep 2, 2022

解决了 @CCKNBC Vercel Root Directory 谢谢

@Ran-Xing
Copy link

Ran-Xing commented Oct 6, 2022

[GET] /
08:09:49:02
RequestId: bb2b93e2-cf78-4a08-8c87-410a333b53a0 Error: Runtime exited with error: exit status 1
Runtime.ExitError
2022-10-06T00:09:49.718Z	undefined	ERROR	Cannot find module '@waline/vercel'
Require stack:
- /var/task/example/index.js
2022-10-06T00:09:49.719Z	undefined	ERROR	Did you forget to add it to "dependencies" in `package.json`?
RequestId: 7cbc3da0-5c25-4a4f-bcd4-150f31afa833 Error: Runtime exited with error: exit status 1
Runtime.ExitError
[GET] /
08:09:46:68
RequestId: 265e0ea9-a071-4bfe-8823-281f28ae50b7 Error: Runtime exited with error: exit status 1
Runtime.ExitError
2022-10-06T00:09:45.041Z	undefined	ERROR	Cannot find module '@waline/vercel'
Require stack:
- /var/task/example/index.js
2022-10-06T00:09:45.041Z	undefined	ERROR	Did you forget to add it to "dependencies" in `package.json`?
2022-10-06T00:09:47.372Z	undefined	ERROR	Cannot find module '@waline/vercel'
Require stack:
- /var/task/example/index.js
2022-10-06T00:09:47.372Z	undefined	ERROR	Did you forget to add it to "dependencies" in `package.json`?
RequestId: bb2b93e2-cf78-4a08-8c87-410a333b53a0 Error: Runtime exited with error: exit status 1
Runtime.ExitError

这个问题又出现了,
Root Directory:example
其他的都是默认值
环境变量是 9.6 设置的,没动

放弃了,deta 挺香的

@zhaocai-ally
Copy link

zhaocai-ally commented Dec 4, 2023

500错误无法注册 独立部署 npm直接安装
2023-12-04_08-20

@xylcbd
Copy link

xylcbd commented Dec 7, 2023

我也碰到了这个问题,后面解决了。原因是我的环境变量命名错误了,我部署在lean clound上,环境变量名字应该是LEAN_ID而不是AppKey,其他两个变量同理。


I also encountered this problem and solved it later. The reason is that my environment variable name is wrong. I deployed it on lean clound. The environment variable name should be LEAN_ID instead of AppKey. The other two variables are the same.

@lanhui672
Copy link

lanhui672 commented Apr 9, 2024

环境变量配置错了/。也无法注册。 我弄好了https://www.lanhui.live/post/2/


The environment variables are configured incorrectly/. Can't register either. I've done it https://www.lanhui.live/post/2/

@lanhui672
Copy link

我也碰到了这个问题,后面解决了。原因是我的环境变量命名错误了,我部署在lean clound上,环境变量名字应该是LEAN_ID而不是AppKey,其他两个变量同理。

I also encountered this problem and solved it later. The reason is that my environment variable name is wrong. I deployed it on lean clound. The environment variable name should be LEAN_ID instead of AppKey. The other two variables are the same.

对,网上有些人教程 这里写错了

@lanhui672
Copy link

lanhui672 commented Apr 9, 2024

500错误无法注册 独立部署 npm直接安装 2023-12-04_08-20

https://www.lanhui.live/post/2/看这里解决


500 error cannot register independent deployment npm direct installation! [2023-12-04_08-20](https://private-user-images.githubusercontent.com/54318393/287561698-629728be-f06d-4676-b808-8514bcc9d16f.png ?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..hHyrJww6dfwYOhLB8KpJ9lGn6zmNVRFLR5jZj_AXSNQ)

https://www.lanhui.live/post/2/See the solution here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests