0

I have been recently asked to add some features to a new project but suddenly I 'm facing this issue when trying to run npm install

C:\Users\NUMBER 1\Desktop\Galacticode>npm install

> codeHome@1.0.0 postinstall C:\Users\NUMBER 1\Desktop\Galacticode
> touch secrets.js

Touching secrets.js

> codeHome@1.0.0 prepare C:\Users\NUMBER 1\Desktop\Galacticode
> if [ -d .git ]; then npm-merge-driver install; fi

-d was unexpected at this time.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! codeHome@1.0.0 prepare: `if [ -d .git ]; then npm-merge-driver install; fi`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the codeHome@1.0.0 prepare 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!     C:\Users\NUMBER 1\AppData\Roaming\npm-cache\_logs\2019-11-26T15_32_13_499Z-debug.log
kyrolos magdy
  • 393
  • 1
  • 4
  • 19

2 Answers2

0

You can solve this using below steps-

step 1: Run $ npm cache clean --force

step 2: Delete node_modules folder and package.lock.json

step 3: Run npm install

These could solve the issue !

Reference : https://stackoverflow.com/a/49505612/11781891

Fourat
  • 2,366
  • 4
  • 38
  • 53
Saket
  • 36
  • 4
0

Try to check you path variable, in this case, it should be C:\Windows\System32, If not, you can reference the answer of Saket, If still not work for you, only one way is that you need UNINSTALL current version and re-install again, it will fix.

dim0147
  • 1
  • 2