Getting the following error when trying to run any ng commands.
`ng --version
module.js:471
throw err;
^
Error: Cannot find module 'rxjs/operators/map'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)`
My project was using cli version 1.4.5, Started happening after a fresh npm install Tried with latest 1.6.4 and got the same error. It was working fine last week.
I got the same issue too
me too
yep, me too. Shouldn't the path be 'rxjs/operator/map' i.e. singular
Me too. Not sure how can this happen after locking the version on package.json
I tried installing new version of rxjs and it worked for me
npm install --save [email protected]
The Alpha fails, as does 5.5.6
I tried @5.5.5 and that resolves. Available versions:
6.0.0-alpha.1, 6.0.0-alpha.0, 5.5.6, 5.5.5, 5.5.4, 5.5.3, 5.5.2, 5.5.1, 5.5.0, 5.5.0-beta.7, 5.5.0-beta.5, 5.5.0-beta.4, 5.5.0-beta.3, 5.5.0-beta.2, 5.5.0-beta.1, 5.5.0-beta.0, 5.4.3, 5.4.2, 5.4.1, 5.4.0, 5.3.3, 5.3.1, 5.3.0, 5.2.1-smooth, 5.2.0, 5.1.1, 5.1.0, 5.0.3, 5.0.2, 5.0.1, 5.0.0, 5.0.0-rc.5, 5.0.0-rc.4, 5.0.0-rc.3, 5.0.0-rc.2, 5.0.0-rc.1, 5.0.0-beta.12, 5.0.0-beta.11, 5.0.0-beta.10, 5.0.0-beta.9, 5.0.0-beta.8, 5.0.0-beta.7, 5.0.0-beta.6, 5.0.0-beta.5, 5.0.0-beta.4, 5.0.0-beta.3, 5.0.0-beta.2, 5.0.0-beta.1, 5.0.0-beta.0, 5.0.0-alpha.14, 5.0.0-alpha.13, 5.0.0-alpha.12, 5.0.0-alpha.11, 5.0.0-alpha.10
Updating rxjs package from 5.4.3 to 5.5.6 fixed the issue.
Related bug https://github.com/angular/devkit/issues/380
Same for me too, the project.json that I had contained:
"rxjs": "5.4.2",
Changing it to the version included with 'ng new' scaffolding solved the problem:
"rxjs": "^5.5.2",
Remove node_module folder and run following command: npm install
I am closing this issue as it will be tracked via angular/devkit#380.
As of now to get rid of this issue, please run npm install [email protected] globally on system after npm install, if you dont need to change code
npm install --save [email protected]
npm install rxjs@6 rxjs-compat@6 --save
@lovesinghchahal
Thanks you.
I have same error
Cannot find module 'rxjs-compat/Observable'
And after run install above, server build success :D
Thanks!!
I have same error too
just before install rxjs and rxjs-compat packages (current version 6.2.0)
npm install [email protected] [email protected] --save
after server buil success
My issue resolved , after running below command,
npm install [email protected] [email protected] --save
Thanks for saving my time.
I had the same problem after install primeicons (npm install primeicons), I resolve it with re-installation rxjs and rxjs-compat, I come late, sorry
npm install --save [email protected] will fix the issue.. It worked for me
I used yarn to reinstall. It worked.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
npm install rxjs@6 rxjs-compat@6 --save