amplify-backend
amplify-backend copied to clipboard
Node v20.12.x causes segmentation fault with `npx ampx sandbox` and latest version of node due to parcelWatcher
Environment information
System:
OS: Linux 5.15 Arch Linux
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 11.50 GB / 15.59 GB
Shell: /usr/bin/zsh
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
Yarn: undefined - undefined
npm: 10.5.2 - ~/.nvm/versions/node/v20.12.2/bin/npm
pnpm: undefined - undefined
NPM Packages:
@aws-amplify/backend: 0.13.0-beta.16
@aws-amplify/backend-cli: 0.12.0-beta.18
aws-amplify: 6.0.28
aws-cdk: 2.137.0
aws-cdk-lib: 2.137.0
typescript: 5.4.5
Description
Ran into this one today, putting it here in case anyone else hits the same issue. Running npx amplify sandbox
will result in a segmentation fault when using node v20.12 if there are any wildcards in the .gitignore
file due to an issue with parcelWatcher.
Workaround - rollback to node v20.11 until resolved.
https://github.com/parcel-bundler/watcher/issues/170
Thanks! It solved the problem for me.
thank you for this!!! really really thank you, I was going crazy trying to find a way to solve it.
@deconduino thank you for reporting this. Marking this as bug to track this.
thanks for reporting, I was using Node v.20.2 and found the same error, I rolled Node back to v.20.11.0 and sandbox is working again.
Thank you!
nvm install --lts
bringing me to v20.13.1 worked for me
Yep, same here, switching to the node lts version fixed
switching to lts did not work for me.
Using a relatively new version of node, and walking through the amplify gen 2 docs step by step including using the aws supplied react vite template gives you Segmentation fault (Abort). Not the best user experience. Understandably, its not aws's bug - but until its fixed I would think perhaps AWS should modify their .gitignore of the template (removing wildcards) to provide a better user experience.
Removing all wildcards from .gitignore worked for me - thanks for the tip.
Switched to v20.11 && ITS WORKING FINE