-
Notifications
You must be signed in to change notification settings - Fork 75
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
Issue bundling custom function: Failed to instantiate nodejs function construct #2484
Comments
Hi @mgreiner79 Thanks for reporting this issue. I’m transferring it to the Amplify Backend for better assistance. |
Hey @HuiSF, thank you for reaching out. Could provide us some information on how was node installed Additionally, could you try update the
|
Hi @ykethan , thanks for the reply. I have updated to
But the problem persists. |
@mgreiner79 could you let us know the terminal being used such for example: CMD, powershell or WSL and is Node.js path currently added to the |
Hi @ykethan , |
@ykethan , so when i do it using WSL (this means doing a fresh install of node on WSL, installing amplfi cli globally, and re-doing the project installation) it successfully deploys. |
Hey @mgreiner79, the |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Not applicable
Amplify Version
v6
Amplify Categories
function
Backend
Amplify Gen 2
Environment information
Describe the bug
When deploying a basic function to sandbox, the following error occurs:
"""
Failed to instantiate nodejs function construct
Caused By: Failed to bundle asset amplify-amplifyvitereacttemplate-<MY_SANDBOX>/function/test-function-lambda/Code/Stage, bundle output is located at <MY_PROJECT_FOLDER>amplify\artifacts\cdk.out\bundling-temp-49f5fc225f5f9c84d79ef6eb8c561146ce3a8f455642ad6758130b26a30884b3-error: Error: spawnSync cmd ENOENT
"""
Expected behavior
I am trying to implement the basic "hello world" exampl for implementing a custom function, as shown in the amplify gen2 docs.
It is expected that the "hello world" example, in a fresh Amplify template project, should successfully deploy the lambda function to the sandbox environment.
Reproduction steps
npx ampx sandbox --debug
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: