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

Does not work on Windows #7

Closed
coyoteecd opened this issue Jun 21, 2022 · 1 comment · Fixed by #9
Closed

Does not work on Windows #7

coyoteecd opened this issue Jun 21, 2022 · 1 comment · Fixed by #9

Comments

@coyoteecd
Copy link
Contributor

coyoteecd commented Jun 21, 2022

I tried using this plugin on Windows and it doesn't work due to hard-coded CLI commands that the plugin tries to execute (whose syntax is Linux-specific). Here's the error I get:

Error:
Error: Command failed: mkdir -p /tmp/serverless-esbuild-bundle-analyzer/my-lambda.zip/1655816493977
The syntax of the command is incorrect.

    at ChildProcess.exithandler (node:child_process:398:12)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

On Windows, mkdir does not accept a -p parameter (syntax is mkdir [target]). But you should be using Nodes mkdir command instead.

@coyoteecd
Copy link
Contributor Author

Another problem is the plugin calls "unzip" CLI command, this does not exist on Windows at all and should be replaced with a zip library (preferably the same that Serverless Framework is using, to avoid introducing an additional dependency)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant