You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Serverless Framework v4.1.7创建Hello World项目时提示配置文件不存在的问题求助

Serverless Framework v4.1.7创建Hello World项目时提示配置文件不存在的问题求助

各位好,我最近刚开始接触Serverless Framework,想创建一个基础的Hello World项目试试手,但一直卡在一个错误上,实在搞不懂哪里出问题了,来请教一下大家。

我遇到的错误提示是:

✖ Configuration file not found in directory "D:\node aws\project-tgg-2"

下面是我完整的操作流程,都是在Git Bash里执行的:

haric@LAPTOP-Q7N9HUP9 MINGW64 /d/node aws
$ sls --version

Serverless ϟ Framework
 • 4.1.7

haric@LAPTOP-Q7N9HUP9 MINGW64 /d/node aws
$ mkdir project-tgg-1
mkdir: cannot create directory ‘project-tgg-1’: File exists

haric@LAPTOP-Q7N9HUP9 MINGW64 /d/node aws
$ mkdir project-tgg-2

haric@LAPTOP-Q7N9HUP9 MINGW64 /d/node aws
$ cd project-tgg-2/

haric@LAPTOP-Q7N9HUP9 MINGW64 /d/node aws/project-tgg-2
$ sls create^C

✖ Configuration file not found in directory "D:\node aws\project-tgg-2"

haric@LAPTOP-Q7N9HUP9 MINGW64 /d/node aws/project-tgg-2
$ sls create --template hello-world

✖ Configuration file not found in directory "D:\node aws\project-tgg-2"

我先是确认了Serverless的版本是4.1.7,然后新建了空目录project-tgg-2并进入,之后尝试用sls create和sls create --template hello-world命令创建项目,但两次都弹出了“配置文件不存在”的错误。我本来以为sls create就是用来初始化项目、生成配置文件的,怎么反而会要求先有配置文件呢?有没有懂的朋友帮我看看问题出在哪呀?

备注:内容来源于stack exchange,提问作者harish palsande

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 12:45:28