你好,
我在 OS X 上,我正在运行无服务器 0.5.6。
运行sls function deploy --all
或sls dash deploy
时随机出现以下错误:
/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
Error: ENOTEMPTY: directory not empty, rmdir '/Users/cspeer/Development/Atameo/api/_meta/_tmp'
at Error (native)
From previous event:
at FunctionDeploy._removeTmpFolder (/usr/local/lib/node_modules/serverless/lib/actions/FunctionDeploy.js:305:20)
From previous event:
at FunctionDeploy.functionDeploy (/usr/local/lib/node_modules/serverless/lib/actions/FunctionDeploy.js:104:10)
From previous event:
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:211:25
at Array.reduce (native)
at Serverless._execute (/usr/local/lib/node_modules/serverless/lib/Serverless.js:210:26)
at Object.actions.(anonymous function) [as functionDeploy] (/usr/local/lib/node_modules/serverless/lib/Serverless.js:429:20)
at /usr/local/lib/node_modules/serverless/lib/actions/DashDeploy.js:234:26
From previous event:
at DashDeploy
我的猜测是它与 osx 的.DS_STORE
文件有关,但不确定。
干杯,
克里斯
看起来是由于在 FunctionDeploy.js 的第 305 行使用了:fse.removeAsync()
将其更改为 fse.remove () 修复它
解决方法是一次部署一个功能,
即:我的部署脚本
cwd=$(pwd)
serverless resources deploy --all -s dev
find . -maxdepth 3 -type f -name "package.json" -not -iwholename "./node_modules*" -not -iwholename "./" -not -iwholename "./lib/*" -not -iwholename "./tests/*" -not -iwholename "./package.json" -print0 | while IFS= read -r -d $'\0' line; do
DIR=$(dirname "$line")
echo "processing : cd $DIR/"
cd $DIR/ && serverless function deploy --prune --number 1 -s dev && cd $cwd
done
您好,感谢您与我们联系! 至此,我们已经停止了 Serverless 0.5 的工作,以完全专注于我们目前正在开发的 V1.0。 因此,我们不会对 0.5 进行任何更改,也不会计划在这一点上发布任何未来版本。 我们只有有限的资源,只需要确保我们将所有的东西都放入下一个版本中(并且从那时起可以提供很好的长期支持和向后兼容性)。 希望你能理解。
我们很乐意收到您对框架 V1 的反馈,我很乐意为您解答任何问题,以确保它对您的所有工作都很好。
最有用的评论
解决方法是一次部署一个功能,
即:我的部署脚本