0

While I am running any project in my git bash it's showing the following error:

ionic -v
module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\Program Files\Git\node_modules\ionic\bin\ionic'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

So I am not able to run the project and also it create a sh.exe.stackdump file in my project. I am not sure what the problem is. Please anyone help to find out the solution.

smottt
  • 3,272
  • 11
  • 37
  • 44
Karthiga
  • 859
  • 2
  • 17
  • 33

1 Answers1

1

After cloning a repo you should run :

npm install

in your git root folder to install npm dependencies before being able to run the app.

CCH
  • 1,516
  • 1
  • 13
  • 24
  • Yeah i do this but the same problem occurs. – Karthiga Feb 16 '17 at 05:34
  • npm install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch okidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64" }) – Karthiga Feb 16 '17 at 05:35
  • Does the folder 'C:\Program Files\Git\node_modules\ionic\bin\ionic' exists on your machine ? – CCH Feb 16 '17 at 09:13
  • no if i install ionic globally it saved inside my user/appdata/roaming/npm my git folder does not contain ionic – Karthiga Feb 16 '17 at 09:25
  • Then you should add the folder where ionic is installed to your NODE_PATH env variable. You can find out some more on this question : http://stackoverflow.com/questions/15636367/nodejs-require-a-global-module-package – CCH Feb 16 '17 at 09:51