Vercel 原来以 now.json 命名的配置文件已经出现无法构建的问题,需改为 vercel.json 恢复正常工作。
Vercel 构建时出现「Warning: “now.json” is deprecated and no longer supported.」错误,已经不再支持"now.json"命名的配置文件。请重命名为 vercel.json。
详细错误提示如下:
|
|
在错误输出的相关文档中并未提及 now.json 失效,只是说明了配置文件的命名应该是 vercel.json/toml/ts。
所以只需按照官方文档说明,将 now.json 文件名称改为 vercel.json 即可(文件中内容无需调整)。
修改好后推送,再次部署就不会报该错误了。
File-based configuration
File-based configuration lives in your repository and gets version-controlled with your code. You can use vercel.json or vercel.toml for static configuration, or vercel.ts for programmatic configuration that runs at build time. The static formats support the same properties, while vercel.ts lets you generate configuration dynamically using environment variables, API calls, or other build-time logic. You can only use one configuration file per project.
转载请注明转自: 一极乐( https://yijile.com/zh/warning-now-json-is-deprecated-by-vercel/ )
本文采用
CC BY-NC-SA 4.0
方式授权。
转载请注明出处和本文链接,说明是否进行修改,不得用于商业用途,使用相同方式共享。