Cannot find module 'rxjs/symbol/observable' on ng serve
Please provide us with the following information:
OS?
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 10
Versions.
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
beta 31
Repro steps.
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng serve
The log given by the failure.
Normally this include a stack trace and some more information.
Cannot find module 'rxjs/symbol/observable'
Error: Cannot find module 'rxjs/symbol/observable'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at globalScope (D:\node_modules@angular\core\bundles\core.umd.js:7:85)
at Object.
Mention any other details that might be useful.
Thanks! We'll be in touch soon.
Steps I took to resolve Issue:
- Uninstalled angular cli npm uninstall @angular/cli -g
- Installed rxJS npm install rxjs
- Cleared cache npm cache clean
- Installed angular cli npm install @angular/cli -g
The new release (beta.32-3) has fixed these missing deps.
npm install rxjs -g npm cache clean resolved my problem
Replace import { Observable } from 'rxjs/observable'; # Incorrect to import { Observable } from 'rxjs/Observable'; # Correct - UPPERCASE 'O'
It worked for me! :)
@smartworld-konoha Ugh..... that was exactly my problem too. Fixing the case fixed it for me.
for newer npm versions do npm cache verify
npm install rxjs@6 rxjs-compat@6 --save
This solves the all angular 6 problems regarding Rxjs...
The case fix proposed by @smartworld-konoha worked for me because my team members had created a project using Observable on Windows (case insensitive) and I was running it on Linux (case sensitive). shakes fist in air
npm install --save rxjs-compat
Its working for me.
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.