cli icon indicating copy to clipboard operation
cli copied to clipboard

error Failed at the [email protected] postinstall script.

Open indyarocks opened this issue 3 years ago • 1 comments

Describe the bug

While installing netlify cli - npm install netlify-cli -g

Getting following error:

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @netlify/[email protected]: wanted {"os":"android","arch":"x64"} (current: {"os":"darwin","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./scripts/postinstall.mjs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/chandan/.npm/_logs/2023-06-20T14_17_19_876Z-debug.log

Here is the log:

$>  ➜ cat /Users/chandan/.npm/_logs/2023-06-20T14_17_19_876Z-debug.log
...

31252 verbose node v12.16.2
31253 verbose npm  v6.14.4
31254 error code ELIFECYCLE
31255 error errno 1
31256 error [email protected] postinstall: `node ./scripts/postinstall.mjs`
31256 error Exit status 1
31257 error Failed at the [email protected] postinstall script.
31257 error This is probably not a problem with npm. There is likely additional logging output above.
31258 verbose exit [ 1, true ]
 ➜ node -v
v12.16.2

Steps to reproduce

Installing netlify cli - npm install netlify-cli -g

On Mac OS Ventura 13.4

Configuration

No response

Environment

npx: installed 1 in 0.835s

System: OS: macOS 13.4 CPU: (8) x64 Apple M1 Memory: 36.79 MB / 8.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 12.16.2 - ~/.nvm/versions/node/v12.16.2/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 6.14.4 - ~/.nvm/versions/node/v12.16.2/bin/npm

indyarocks avatar Jun 20 '23 14:06 indyarocks

Node.js 12 is not supported.

XhmikosR avatar Jun 29 '23 09:06 XhmikosR