amplify-backend icon indicating copy to clipboard operation
amplify-backend copied to clipboard

Node v20.12.x causes segmentation fault with `npx ampx sandbox` and latest version of node due to parcelWatcher

Open deconduino opened this issue 10 months ago • 8 comments

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

deconduino avatar Apr 15 '24 16:04 deconduino

Thanks! It solved the problem for me.

JonasGranlund1 avatar Apr 17 '24 09:04 JonasGranlund1

thank you for this!!! really really thank you, I was going crazy trying to find a way to solve it.

jgomezupstart13 avatar Apr 18 '24 15:04 jgomezupstart13

@deconduino thank you for reporting this. Marking this as bug to track this.

ykethan avatar Apr 19 '24 15:04 ykethan

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.

pchinjr avatar May 16 '24 14:05 pchinjr

Thank you!

nvm install --lts bringing me to v20.13.1 worked for me

TheRealBenForce avatar May 22 '24 06:05 TheRealBenForce

Yep, same here, switching to the node lts version fixed

brunohnq avatar Jun 05 '24 01:06 brunohnq

switching to lts did not work for me.

satya1395 avatar Jun 06 '24 03:06 satya1395

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.

supertick avatar Jun 29 '24 16:06 supertick

Switched to v20.11 && ITS WORKING FINE

juaose avatar Sep 02 '24 19:09 juaose