Niroj Maharjan
Niroj Maharjan

Reputation: 99

Npm/Yarn Not installing properly and giving issues

node ./postinstall.js

ngrok - error unpacking binary Error: You cannot extract a file outside of the target path

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @expo/[email protected] postinstall: node ./postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @expo/[email protected] postinstall script.

Upvotes: 4

Views: 5571

Answers (3)

Sajjan Patel
Sajjan Patel

Reputation: 1

first delete the node module after that clear the cache and then install npm hope works for you.

Upvotes: 0

Saad Zafar
Saad Zafar

Reputation: 258

sudo npm i -g ngrok --unsafe-perm=true --allow-root

This will fix your issue.

Upvotes: 12

Mayur
Mayur

Reputation: 5053

Step 1: $ npm cache clean --force

Step 2: delete node_modules by $ rm -rf node_modules folder or delete it manually by going into the directory and right-click > delete.

Step 3: npm install

To start again, $ npm start

This worked for me. Hopes it works for you too.

Still if it is there, kindly check the error it displays in red and act accordingly. Be careful when using rm -rf. This error is specific to node.js environment. Happy Coding!!

Upvotes: 1

Related Questions