'Does anyone know why I'am getting error during amplify init ? I checked the memory is not full?
ec2-user:~/environment/wild-rydes (master) $ amplify init
Downloading release from https://d2bkhsss993doa.cloudfront.net/8.0.2/amplify-pkg-linux-x64.tgz
node:internal/buffer:959
super(bufferOrLength, byteOffset, length);
^
RangeError: Array buffer allocation failed
at new ArrayBuffer ()
at new Uint8Array ()
at new FastBuffer (node:internal/buffer:959:5)
at createUnsafeBuffer (node:internal/buffer:1062:12)
at allocate (node:buffer:410:10)
at Function.allocUnsafe (node:buffer:375:10)
at Function.concat (node:buffer:553:25)
at Extract. (/home/ec2-user/.nvm/versions/node/v16.14.2/lib/node_modules/@aws-amplify/cli/lib/binary.js:124:37)
at Extract.emit (node:events:538:35)
at finishMaybe (/home/ec2-user/.nvm/versions/node/v16.14.2/lib/node_modules/@aws-amplify/cli/node_modules/readable-stream/lib/_stream_writable.js:624:14)
Solution 1:[1]
It seems to be something related to version 8.0.2, which I'm sure AWS will fix at some point.
As a workaround you can install another Amplify CLI version and you will be able to use it.
Example:
npm i -g @aws-amplify/[email protected]
Solution 2:[2]
Same error occured for version 8.1.0
https://d2bkhsss993doa.cloudfront.net/8.1.0/amplify-pkg-linux-x64.tgz
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | olayer9 |
Solution 2 | SzabK |