Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module 'rxjs/operators' while creating new project in angular-cli

when i am trying to create new project in angular-cli by terminal using command

Mani-MacBook-Air:angular-project manigupta$ ng new controlgame

showing error:

module.js:487
throw err;
^

Error: Cannot find module 'rxjs/operators'

at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@angular-devkit/core/src/logger/indent.js:10:21)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)

Please let me know what I should do to create new project in angular-cli

Answer:

I uninstalled the angular-cli then install with latest version using following command

sudo npm uninstall -g @angular/cli

npm cache verify

sudo npm install -g @angular/cli@latest

('sudo' is only for mac/linux user)

like image 203
Mani Gupta Avatar asked Sep 16 '26 21:09

Mani Gupta


1 Answers

Make sure you are using the latest version of the cli

npm install -g @angular/cli@latest
like image 127
Igor Avatar answered Sep 19 '26 00:09

Igor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!