1

I just clone an Ionic project to my pc, as .gitignore was used there was no node_modules installed in the directive ...So when I typed in ionic serve in the CLI it was giving this error

? Looks like a fresh checkout! No ./node_modules directory found. Would you like to install project dependencies? Yes Installing dependencies may take several minutes!

npm i × Running command - failed! [ERROR] An error occurred while running npm i (exit code 1):

    npm ERR! code 1
    npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
    npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
    npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
    npm ERR! C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 19: .: git-sh-setup: file not found
    npm ERR!

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\malre\AppData\Roaming\npm-cache\_logs\2018-06-28T14_57_56_909Z-debug.log

what ca I do to resolve this?

thank you

1 Answers1

1

Which file system are you using ? Do you happen to be using bash on windows ? Did you run npm install -g ionic cordova ? If thats where you are failing, please run whichever terminal you are using as administrator or the npm i as root.

That should fix your issue.

Gentle Brute
  • 142
  • 2
  • 4
  • yeah I'm using bash on windows and I have run the `npm install -g ionic cordova` . I created new projects in Ionic and those perfectly run on my browser when i run `ionic serve` – vamshi malreddy Jun 28 '18 at 16:05
  • how to run it with `npm i` as root ?? i didn't get it – vamshi malreddy Jun 28 '18 at 16:08
  • To use `npm install` as root first you need to open windows bash as Administrator. This should download all the dependencies of your proyect. – Azac Jun 28 '18 at 22:07