angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Cannot find module 'rxjs/symbol/observable' on ng serve

Open adriaanvermeire opened this issue 9 years ago • 11 comments

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 --version and 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. (D:\node_modules@angular\core\bundles\core.umd.js:10:2) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (D:\Google Drive\School\KdG\2e jaar\Front End\3e periode\apiProject\node_modules@angular\cli\models\webpack-config.js:4:27) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (D:\Google Drive\School\KdG\2e jaar\Front End\3e periode\apiProject\node_modules@angular\cli\tasks\serve.js:10:26) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Class.run (D:\Google Drive\School\KdG\2e jaar\Front End\3e periode\apiProject\node_modules@angular\cli\commands\serve.js:74:27) at Class. (D:\Google Drive\School\KdG\2e jaar\Front End\3e periode\apiProject\node_modules@angular\cli\ember-cli\lib\models\command.js:134:17) at process._tickCallback (internal/process/next_tick.js:103:7)

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

adriaanvermeire avatar Feb 16 '17 20:02 adriaanvermeire

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

RicardoVaranda avatar Feb 17 '17 15:02 RicardoVaranda

The new release (beta.32-3) has fixed these missing deps.

filipesilva avatar Feb 17 '17 15:02 filipesilva

npm install rxjs -g npm cache clean resolved my problem

MartaWisniewska avatar Feb 21 '17 07:02 MartaWisniewska

Replace import { Observable } from 'rxjs/observable'; # Incorrect to import { Observable } from 'rxjs/Observable'; # Correct - UPPERCASE 'O'

It worked for me! :)

smartworld-dm avatar Jan 16 '18 10:01 smartworld-dm

@smartworld-konoha Ugh..... that was exactly my problem too. Fixing the case fixed it for me.

blueslatedev avatar Mar 19 '18 20:03 blueslatedev

for newer npm versions do npm cache verify

cfphpflex avatar Apr 24 '18 21:04 cfphpflex

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

This solves the all angular 6 problems regarding Rxjs...

kedar8 avatar May 21 '18 06:05 kedar8

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

lyndseypadget avatar Jun 01 '18 20:06 lyndseypadget

npm install --save rxjs-compat

Its working for me.

yogeshpatil143 avatar Oct 25 '18 11:10 yogeshpatil143

npm install -g @angular/[email protected]

resolved my problem

wkuroki avatar Nov 15 '18 19:11 wkuroki

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.