0

I attempted to upgrade from Angular-cli beta.28 following instructions here: https://github.com/angular/angular-cli/wiki/stories-rc.0-update to the latest angular/cli due to a href overwrite bug...

Now when I run ng --version (to see what version I am on), I get the following error...How do I fix this? and if this is expected behavior, How due I determine my version now? The application appears to work well and the overwrite bug is fixed...

npm --version 4.3.0 PS C:\Users\tpfield\git\ode\ode-client> ng --version ng : The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ng --version + ~~ + CategoryInfo : ObjectNotFound: (ng:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

user2524574
  • 109
  • 2
  • 10
  • Did the install/update run without a ton of errors? Did you run the install/update as admin or root? – R. Richards Feb 28 '17 at 23:44
  • The application appears to be working ok and the href overwrite bug is fixed...I didn't run as root, let me try that...I did get these warnings: +-- UNMET DEPENDENCY @angular/compiler@^2.3.1 +-- @angular/compiler-cli@2.4.8 | +-- minimist@1.2.0 | +-- reflect-metadata@0.1.10 | `-- UNMET PEER DEPENDENCY typescript@^2.0.2 `-- UNMET DEPENDENCY @angular/core@^2.3.1 – user2524574 Feb 28 '17 at 23:51
  • So, everything is working except for `ng --version`? That is unusual. `ng serve` no problem? Definitely try root. Good luck! – R. Richards Feb 28 '17 at 23:55
  • hmmm, ok, I started over and it worked...I'm thinking the issue was I didn't install with admin, that or the node_modules dir wasn't completely deleted...not sure...thanks for your time... – user2524574 Mar 01 '17 at 00:04
  • Yeah, running it as root is the key. This has bit me in the past. Glad you got it working. – R. Richards Mar 01 '17 at 00:09

2 Answers2

0

I ran through the steps again, this time with cmd opened as admin and everything worked well...not sure what the problem was...

It's also possible I hadn't stopped the server when I ran through it the first time

user2524574
  • 109
  • 2
  • 10
0

npm start worked

PS I:\devlab\nipashe-web> ng --version ng : The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ng --version + ~~ + CategoryInfo : ObjectNotFound: (ng:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

PS I:\devlab\nipashe-web> npm start

nipashe-web@0.0.0 start I:\devlab\nipashe-web ng serve

** NG Live Development Server is running on http://localhost:4200. ** Hash: 9e9c74625fca651c9d2e Time: 51954ms chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 153 kB {5} [initial] [rendered] chunk {1} main.bundle.js, main.bundle.js.map (main) 47 kB {4} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 770 kB {5} [initial] [rendered] chunk {3} scripts.bundle.js, scripts.bundle.js.map (scripts) 387 kB {5} [initial] [rendered] chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.48 MB [initial] [rendered] chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered] webpack: Compiled successfully