-
Notifications
You must be signed in to change notification settings - Fork 4k
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
UNKNOWN error when trying to use NodejsFunction #7683
Comments
Seems from the stack trace that the error comes from ramda? Do you still see the error when removing this dependency? Can you share a reproductible example? |
I'll look into it more and see if I can come up with a minimal project that reproduces it. |
Closing for now |
You need docker with v1.38.0. |
Thank you. That also does not work Docker is asking for an absolute path but getting a relative one it looks like, but I'll try to look into it and file another new issue later. Not sure I'll want to have Docker installed just for this library, so I'll likely switch back to the regular @aws-cdk/aws-lambda library and build the function myself in the future. |
The problem on Windows should be fixed with #8140. |
Every time I try to use
new NodejsFunction
I get a spawnSync error that seems to be related to aws-lambda-nodejs not being able to succesfully execute the parcel command, but I can't figure out exactly why. Running the parcel command manually works fine.Reproduction steps
Run the cdk deploy command
Error Log
Error: Failed to build file at C:\Developer\My.Project\stacks\api\requests\put-ad\put-ad-states\base64-decode-lambda\index.ts: Error: spawnSync C:\Developer\My.Project\node_modules\parcel-bundler\bin\cli.js UNKNOWN
at Builder.build (C:\Developer\My.Project\node_modules@aws-cdk\aws-lambda-nodejs\lib\builder.ts:107:17)
at new NodejsFunction (C:\Developer\My.Project\node_modules@aws-cdk\aws-lambda-nodejs\lib\function.ts:98:13)
at R.pipe.aws_stepfunctions_1.Task.task (C:\Developer\My.Project\stacks\api\requests\put-ad\put-ad-states\state-machine.ts:24:12)
at C:\Developer\My.Project\node_modules\ramda\src\internal_pipe.js:3:27
at C:\Developer\My.Project\node_modules\ramda\src\internal_pipe.js:3:27
at C:\Developer\My.Project\node_modules\ramda\src\internal_arity.js:11:19
at Object.exports.submitAdStateMachine (C:\Developer\My.Project\stacks\api\requests\put-ad\put-ad-states\state-machine.ts:103:21)
at new DigiknowApp (C:\Developer\My.Project\bin\app.ts:43:48)
at Object. (C:\Developer\My.Project\bin\app.ts:61:1)
Environment
Other
Running the command
.\node_modules\.bin\parcel build C:\Developer\My.Project\stacks\api\requests\put-ad\put-ad-states\base64-decode-lambda\index.ts --out-dir .build --out-file index.js --global handler --target node --bundle-node-modules --log-level 2 --no-minify
manually builds the file with no issuesThis is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: