Closed AxopenLyon closed 2 years ago
Hello @AxopenLyon - thanks a lot for reporting and sorry you've run into trouble. That is quite surprising, as I can see that you're running serverless
without any issues in your terminal, correct? I will investigate if we can find the reason for that happening on Windows machines.
In addition, could you please share the output of sls --version
?
Thanks in advance 🙇
Correct, I can use serverless
without any issue, I've been deploying my services with no problem before trying to use serverless-compose
.
$ sls -v
Framework Core: 3.15.0 (standalone)
Plugin: 6.2.2
SDK: 4.3.2
$ npm list -g
C:\Program Files\nodejs -> .\
+-- @serverless/compose@1.0.0
+-- madge@5.0.1
+-- npm@8.5.1
+-- serverless@3.15.0
`-- yarn@1.22.17
Thanks for your help, good luck !
I run into exactly the same problem, when deploying the services separately it works fine.
deploying
Running "serverless deploy --stage dev"
error
spawn serverless ENOENT
Error: spawn serverless ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
serverless -v
Framework Core: 3.15.0
Plugin: 6.2.2
SDK: 4.3.2
npm list -g
├── @aws-amplify/cli@7.6.5
├── newman@5.3.1
├── npm@8.0.0
├── serverless@3.15.0
└── yarn@1.22.15
Hello @chkrause - thanks for reporting - are you also on Windows?
Hello @chkrause - thanks for reporting - are you also on Windows?
yes, I'm on windows.
I am also facing similar issue on windows
Glad to see I am not the only one. I had serverless installed via scoop and uninstalled it from there and installed it globally and still the same thing as well for me.
Thanks everyone for your patience, the fix will be published with the new version that will go out either later today or tomorrow
Hey everyone, fix has been released with v1.0.2 of Compose - please let me know if that fixes your problems
error spawn ENOTDIR
# serverless-compose.yml
services:
service-a:
path: serverless.yml
OS: Mac
Framework Core: 3.15.2 (local)
Plugin: 6.2.2
SDK: 4.3.2
npm list --depth=0
├── @serverless/compose@1.0.2
├── serverless@3.15.2
├── serverless-deployment-bucket@1.5.2
├── serverless-domain-manager@6.0.3
├── serverless-plugin-datadog@5.0.0
├── serverless-prune-plugin@2.0.1
├── serverless-python-requirements@5.4.0
└── serverless-wsgi@3.0.0
sls deploy --service=service-a
✖ service-a › error › 0s
spawn ENOTDIR
Hello @suwat-netprom - in your case the problem is different - path
should point to a directory that contains your project with serverless.yml
, not to the serverless.yml
itself.
Hello @pgrzesik, I confused, thank you explained me.
Happy I could help @suwat-netprom 🎉
Looks good now - Thanks for this quick fix.
Unfortunatly I can't pass param to the serverless compose.
serverless deploy --stage del --param="AccountIdZendesk=xxxxxxx"
Cannot resolve variable at "custom.AccountIdZendesk": The param "AccountIdZendesk" cannot be resolved from CLI options or stage params. If you are using Serverless Framework Compose, make sure to run commands via Compose so that all parameters can be resolved
The "--param" option is not supported (yet) in Serverless Framework Compose
@chkrause indeed --param
is not supported in Compose. We could add that parameter, but let's try to understand your use case first.
Could you open a separate issue though? That way we don't ping those involved in the original issue which was about Windows support.
I've been waiting for this kind of feature, thanks for it ! I just would like to report a bug which I've found a workaround, but maybe you could find a real fix.
I'm on a Windows 11, and I've installed
serverless
and@serverless/compose
usingnpm -g
.Everything works fine on each single service, but when I try to deploy using compose, I got the following error :
My compose file looks like this :
My workaround was to install serverless using
choco
in addition tonpm -g
Removing serverless innpm -g
to only usechoco serverless
is not working neither, I really need to havenpm -g
andchoco
serverless.Hope you guys can find a solution, either way keep up with the great work, this package is amazing !