Skip to content

Cannot find module 'rxjs/operators/map' when running any ng command #9190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
csaldan opened this issue Jan 12, 2018 · 21 comments
Closed

Cannot find module 'rxjs/operators/map' when running any ng command #9190

csaldan opened this issue Jan 12, 2018 · 21 comments

Comments

@csaldan
Copy link

csaldan commented Jan 12, 2018

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. (C:\work\fs\test\test-fspg\node_modules@angular-devkit\core\src\json\schema\registry.js:15:15)
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.

@chandramuralis
Copy link

I got the same issue too

@StolenOrange
Copy link

me too

@mousedown
Copy link

mousedown commented Jan 12, 2018

yep, me too. Shouldn't the path be 'rxjs/operator/map' i.e. singular

@cksekhar
Copy link

Me too. Not sure how can this happen after locking the version on package.json

@monicareddy30
Copy link

I tried installing new version of rxjs and it worked for me
npm install --save rxjs@5.5.2

@mousedown
Copy link

mousedown commented Jan 12, 2018

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

@chandramuralis
Copy link

chandramuralis commented Jan 12, 2018

Updating rxjs package from 5.4.3 to 5.5.6 fixed the issue.

@csaldan
Copy link
Author

csaldan commented Jan 12, 2018

Related bug angular/devkit#380

@mdarefull
Copy link

mdarefull commented Jan 14, 2018

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",

Bhushan001 pushed a commit to ShoppinPal/StockUp that referenced this issue Jan 15, 2018
@sacgrover
Copy link
Contributor

Remove node_module folder and run following command: npm install

@Brocco
Copy link
Contributor

Brocco commented Jan 15, 2018

I am closing this issue as it will be tracked via angular/devkit#380.

@Brocco Brocco closed this as completed Jan 15, 2018
@ppatil27
Copy link

ppatil27 commented Jan 17, 2018

As of now to get rid of this issue, please run npm install rxjs@5.5.6 globally on system after npm install, if you dont need to change code

@Ronniep7
Copy link

Ronniep7 commented May 7, 2018

npm install --save rxjs@5.6.0

@loveneetchahal
Copy link

npm install rxjs@6 rxjs-compat@6 --save

@huynhquocbao92
Copy link

@lovesinghchahal
Thanks you.
I have same error

Cannot find module 'rxjs-compat/Observable'

And after run install above, server build success :D

@pfiterman
Copy link

pfiterman commented Jun 8, 2018

Thanks!!
I have same error too

just before install rxjs and rxjs-compat packages (current version 6.2.0)
npm install rxjs@6.2.0 rxjs-compat@6.2.0 --save

after server buil success

@kishor0412
Copy link

My issue resolved , after running below command,
npm install rxjs@6.2.0 rxjs-compat@6.2.0 --save

Thanks for saving my time.

@FranciscoChile
Copy link

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

@nuwansomasiri8
Copy link

npm install --save rxjs@5.6.0 will fix the issue.. It worked for me

@ehlilier
Copy link

I used yarn to reinstall. It worked.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests