Skip to content
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

Cannot find module 'rxjs/Subject' on ng help #4363

Closed
crutchcorn opened this issue Feb 2, 2017 · 26 comments
Closed

Cannot find module 'rxjs/Subject' on ng help #4363

crutchcorn opened this issue Feb 2, 2017 · 26 comments

Comments

@crutchcorn
Copy link

crutchcorn commented Feb 2, 2017

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:

angular-cli: 1.0.0-beta.28.3
node: 6.9.4
os: win32 x64
>> npm --version
3.10.10

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

On a clean install of Windows, install Node.js 6.9.4 x64
npm install -g angular-cli

The log given by the failure.

Normally this include a stack trace and some more information.

C:\Users\CorbinCrutchley
λ  ng help
As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,
which will only support Node 6.9 and greater. This package will be officially deprecated
shortly after.

To disable this warning use "ng set --global warnings.packageDeprecation=false".

Cannot find module 'rxjs/Subject'
Error: Cannot find module 'rxjs/Subject'
    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 globalScope (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@angular\core\bundles\core.umd.js:7:85)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@angular\core\bundles\core.umd.js:10:2)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@angular\compiler\bundles\compiler.umd.js:7:85
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@angular\compiler\bundles\compiler.umd.js:10:2)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@angular\compiler-cli\index.js:12:18)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@ngtools\webpack\src\plugin.js:5:22)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\node_modules\@ngtools\webpack\src\index.js:6:10)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-configs\typescript.js:3:17)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-configs\index.js:9:10)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-config.js:4:25)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\tasks\build.js:6:24)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\commands\build.run.js:3: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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\commands\help.js:29:33
    at Array.reduce (native)
    at Class.run (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\angular-cli\commands\help.js:27:39)
    at Class.<anonymous> (C:\Users\CorbinCrutchley\AppData\Roaming\npm\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.

I was able to solve this issue by running npm install -g rxjs


Thanks! We'll be in touch soon.

@Jonatthu
Copy link

Jonatthu commented Feb 2, 2017

uninstall node_modules install it again, then run ng serve
That worked in my app after update to @angular/cli beta 29

@crutchcorn
Copy link
Author

Why run ng serve? I was trying to see how to use ng before attempting to create a new project or anything like it

@Jonatthu
Copy link

Jonatthu commented Feb 2, 2017

Uninstall angular cli
Run npm cache clean
then install @angular/cli

@Jonatthu
Copy link

Jonatthu commented Feb 2, 2017

That worked to me on windows and mac

@crutchcorn
Copy link
Author

crutchcorn commented Feb 2, 2017

This remains an issue for me after uninstalling angular-cli and installing @angular/cli and is solved when npm install -g rxjs.

@willgm
Copy link

willgm commented Feb 2, 2017

Same problem here, with both beta 28 and 29.

@DirtyB
Copy link

DirtyB commented Feb 2, 2017

Same here

npm install -g rxjx

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/rxjx
npm ERR! 404
npm ERR! 404 'rxjx' is not in the npm registry.

@beeman
Copy link
Contributor

beeman commented Feb 2, 2017

@DirtyB you probably want to run npm install -g rxjs

@DirtyB
Copy link

DirtyB commented Feb 2, 2017

@beeman
ooops so stupid mistake of mine
thanks

@JediSange
Copy link

JediSange commented Feb 2, 2017

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

@angular/cli: 1.0.0-beta.29
node: 6.9.5
os: darwin x64
npm: 3.10.10

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

run ng help in console

The log given by the failure.

Normally this include a stack trace and some more information.

Cannot find module 'rxjs/Subject'
Error: Cannot find module 'rxjs/Subject'
    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 globalScope (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular/core/bundles/core.umd.js:7:85)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular/core/bundles/core.umd.js:10:2)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at /usr/local/lib/node_modules/@angular/cli/node_modules/@angular/compiler/bundles/compiler.umd.js:7:85
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular/compiler/bundles/compiler.umd.js:10:2)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular/compiler-cli/index.js:12:18)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/plugin.js:5:22)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/index.js:6:10)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/webpack-configs/typescript.js:3:17)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/webpack-configs/index.js:9:10)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/webpack-config.js:4:25)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/tasks/build.js:6:24)
    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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/commands/build.run.js:3: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)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at /usr/local/lib/node_modules/@angular/cli/commands/help.js:29:33
    at Array.reduce (native)
    at Class.run (/usr/local/lib/node_modules/@angular/cli/commands/help.js:27:39)
    at Class.<anonymous> (/usr/local/lib/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.

See #4357 for similar issues and discussion.

@git-wylson
Copy link

Hi, someone can help me....please

==>This is my node properties :
node version : 6.9.5
npm version : 3.10.10

When i run ng serve i have that error:

Cannot find module 'rxjs/symbol/observable'
Error: Cannot find module 'rxjs/symbol/observable'
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 globalScope (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@angular\core\bundles\core.umd.js:7:85)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@angular\core\bundles\core.umd.js:10:2)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@angular\compiler\bundles\compiler.umd.js:7:85
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@angular\compiler\bundles\compiler.umd.js:10:2)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@angular\compiler-cli\index.js:12:18)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@ngtools\webpack\src\plugin.js:5:22)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@ngtools\webpack\src\index.js:6:10)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\models\webpack-configs\typescript.js:3:17)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\models\webpack-configs\index.js:9:10)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\models\webpack-config.js:4:25)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\tasks\serve.js:11:24)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\commands\serve.run.js:6: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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Class.run (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\commands\serve.js:67:16)
at Class. (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\ember-cli\lib\models\command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: ng serve --host 0.0.0.0 --port 7070 --live-reload-port 49153
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'ng serve --host 0.0.0.0 --port 7070 --live-reload-port 49153'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the myproject-ihm-war package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve --host 0.0.0.0 --port 7070 --live-reload-port 49153
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs myproject-ihm-war
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls myproject-ihm-war
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\npm-debug.log

==> This my package.json
{
"name": "myproject-ihm-war",
"version": "1.0.0-SNAPSHOT",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve --host 0.0.0.0 --port 80 --live-reload-port 49153",
"prod": "ng build --prod",
"lint": "tslint "src/**/*.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "^2.4.1",
"@angular/compiler": "^2.4.1",
"@angular/core": "^2.4.1",
"@angular/forms": "^2.4.1",
"@angular/http": "^2.4.1",
"@angular/platform-browser": "^2.4.1",
"@angular/platform-browser-dynamic": "^2.4.1",
"@angular/router": "^3.4.1",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.20",
"@reactivex/rxjs": "^5.0.1",
"@types/chai": "^3.4.34",
"admin-lte": "^2.3.8",
"angular-calendar": "^0.7.2",
"angular2-jwt": "^0.1.24",
"angular2-toaster": "^1.0.2",
"angular2-uuid": "^1.1.0",
"angularfire2": "^2.0.0-beta.7",
"auth0-lock": "^10.4.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"firebase": "^3.6.7",
"font-awesome": "^4.7.0",
"ionicons": "^3.0.0",
"jquery": "^3.1.1",
"ng2-bootstrap": "^1.3.1",
"ng2-translate": "^4.2.0",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"@types/auth0-lock": "^10.0.20",
"@types/jasmine": "^2.2.30",
"angular-cli": "^1.0.0-beta.26",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.5",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "2.0.10"
}
}

thanks for your help

@beeman
Copy link
Contributor

beeman commented Feb 6, 2017

@git-wylson npm install -g rxjs ?

@git-wylson
Copy link

I already do that but i have the same issue

@git-wylson
Copy link

thank @beeman after running npm install rxjs --save-dev, i fix the problem,
But i have an other mistake now,

fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at createSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:8980:109)
at parseSourceFileWorker (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:8940:26)
at Object.parseSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:8899:26)
at Object.createSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:8727:29)
at WebpackCompilerHost.getSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@ngtools\webpack\src\compiler_host.js:294:27)
at findSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45859:29)
at processSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45790:27)
at D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45901:17
at Object.forEach (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:1115:30)
at processReferencedFiles (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45899:16)
at findSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45884:21)
at processSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45790:27)
at processRootFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45694:13)
at D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45151:60
at Object.forEach (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:1115:30)
at Object.createProgram (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:45151:16)
at AotPlugin._setupOptions (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@ngtools\webpack\src\plugin.js:161:28)
at new AotPlugin (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules@ngtools\webpack\src\plugin.js:21:14)
at Object.exports.getNonAotConfig (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\models\webpack-configs\typescript.js:26:13)
at new NgCliWebpackConfig (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\models\webpack-config.js:24:37)
at Class.run (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\tasks\serve.js:31:29)
at D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\angular-cli\commands\serve.run.js:22:22
at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: ng serve --host 0.0.0.0 --port 7070 --live-reload-port 49153
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'ng serve --host 0.0.0.0 --port 7070 --live-reload-port 49153'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the myproject-ihm-war package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve --host 0.0.0.0 --port 7070 --live-reload-port 49153
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs myproject-ihm-war
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls myproject-ihm-war
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\npm-debug.log

Any idea ?

@beeman
Copy link
Contributor

beeman commented Feb 6, 2017

@git-wylson I think it makes sense to do the following:

  • Remove this from you package.json: "@reactivex/rxjs": "^5.0.1",
  • Remove your node_modules
  • Run npm install

@Meligy
Copy link
Contributor

Meligy commented Feb 6, 2017

Looks like it's been addressed in #4465 / 39fa206

(In master, not yet released)

@git-wylson
Copy link

@beeman sorry, I do that but i have the same error
and i don't know what can i do

@kkotak
Copy link

kkotak commented Feb 8, 2017

Still stuck at

TypeError: Cannot read property 'length' of undefined
at createSourceFile (D:\dev\workspaces\webstorm\makasi\myproject-ihm-war\node_modules\typescript\lib\typescript.js:8980:109)......

after trying all the suggestions so far. Completely hosed my build! Help!

EDIT - Here's my package.json

{
"name": "projName",
"version": "0.0.0",
"license": "PROP",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint "src/**/*.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "^2.4.6",
"@angular/compiler": "^2.4.6",
"@angular/compiler-cli": "^2.4.6",
"@angular/core": "^2.4.6",
"@angular/forms": "^2.4.6",
"@angular/http": "^2.4.6",
"@angular/platform-browser": "2.4.6",
"@angular/platform-browser-dynamic": "^2.4.6",
"@angular/platform-server": "^2.4.6",
"@angular/router": "^3.1.1",
"@angular/cli": "1.0.0-beta.30",
"@angular/material": "^2.0.0-alpha.11-3",
"@types/core-js": "^0.9.35",
"angular2-in-memory-web-api": "0.0.21",
"angular2-jwt": "^0.1.28",
"angular2-materialize": "^6.2.1",
"angular2-oauth2": "^1.3.10",
"angular2-tag-input": "^1.2.3",
"angular2-text-mask": "4.1.0",
"angularfire2": "^2.0.0-beta.7",
"auth0-lock": "^10.7.2",
"bcrypt-nodejs": "0.0.3",
"bluebird": "^3.3.5",
"body-parser": "^1.15.0",
"bootstrap": "^3.3.7",
"config": "^1.20.1",
"cookie-parser": "^1.4.1",
"core-js": "^2.4.1",
"debug": "~2.2.0",
"ejs": "^2.4.1",
"es6-promise": "^3.0.2",
"es6-shim": "^0.35.0",
"express": "~4.13.1",
"express-session": "^1.13.0",
"fhir.js": "0.0.19",
"firebase": "^3.4.1",
"hammerjs": "^2.0.8",
"jquery": "^2.2.4",
"materialize-autocomplete": "^1.0.7",
"materialize-css": "^0.97.8",
"materialize-tags": "^1.0.0",
"morgan": "^1.7.0",
"ng2-auto-complete": "^0.8.9",
"ng2-chips": "0.0.19",
"ng2-completer": "^0.2.3",
"ng2-modal": "0.0.22",
"ng2-nouislider": "^1.5.0",
"ng2-scrollspy": "^0.3.6",
"ng2-sticky-kit": "^2.0.1",
"ng2-tag-input": "^0.8.0",
"ng2-webstorage": "^1.5",
"nouislider": "^9.0.0",
"passport": "^0.3.2",
"passport-google-oauth2": "^0.1.6",
"passport-local": "^1.0.0",
"passport-oauth2": "^1.3.0",
"passport-twitter": "^1.0.4",
"primeng": "^1.0.0-beta.20",
"reflect-metadata": "0.1.8",
"request-promise": "^3.0.0",
"rxjs": "^5.1.0",
"sequelize": "^3.21.0",
"serve-favicon": "~2.3.0",
"systemjs": "^0.19.39",
"text-mask-addons": "^1.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.6"
},
"devDependencies": {
"@angular/cli": "1.0.0-beta.30",
"@types/hammerjs": "^2.0.33",
"@types/jasmine": "^2.2.30",
"@types/request": "^0.0.30",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.5",
"rxjs": "^5.1.0",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "2.0.2"
}
}

And angular-cli.json -

{
"project": {
"version": "1.0.0-beta.15",
"name": "myProject"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": "assets",
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,
"styles": [
"styles.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/materialize-css/dist/js/materialize.js"
],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false
}
}

@erajabi
Copy link

erajabi commented Feb 16, 2017

Same issue! Windows 7 with latest version of node and npm.

Cannot find module 'rxjs/symbol/observable' Error: Cannot find module 'rxjs/symbol/observable' 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 globalScope (C:\Program Files\nodejs\node_modules\angular-cli\node_modul s\@angular\core\bundles\core.umd.js:7:85) at Object.<anonymous> (C:\Program Files\nodejs\node_modules\angular-cli\nod _modules\@angular\core\bundles\core.umd.js:10:2) 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) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at C:\Program Files\nodejs\node_modules\angular-cli\node_modules\@angular\c mpiler\bundles\compiler.umd.js:7:85 at Object.<anonymous> (C:\Program Files\nodejs\node_modules\angular-cli\nod _modules\@angular\compiler\bundles\compiler.umd.js:10:2) 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) at Module.require (module.js:497:17)

@beeman
Copy link
Contributor

beeman commented Feb 16, 2017

Some steps to troubleshoot this issue:

Clean up

  • remove node_modules from your project
  • remove any angular-cli and @angular/cli references from package.json if it's there
  • Uninstall angular-cli and @angular/cli globally: npm uninstall -g angular-cli @angular/cli

Reinstall

  • Install @angular/cli globally: npm install -g @angular/cli
  • Install @angular/cli in your project: npm install --save-dev @angular/cli

This should get a working version.

If you tried this and it does not work, please submit your package.json as that will probably contain something that gets in the way from this working correctly.

For reference, this is what the dependencies of an app installed with @angular/[email protected] looks like:

 "dependencies": {
    "@angular/common": "^2.4.0",
    "@angular/compiler": "^2.4.0",
    "@angular/core": "^2.4.0",
    "@angular/forms": "^2.4.0",
    "@angular/http": "^2.4.0",
    "@angular/platform-browser": "^2.4.0",
    "@angular/platform-browser-dynamic": "^2.4.0",
    "@angular/router": "^3.4.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.7.2"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0-beta.31",
    "@angular/compiler-cli": "^2.4.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "codelyzer": "~2.0.0-beta.1",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "protractor": "~5.1.0",
    "ts-node": "1.2.1",
    "tslint": "^4.3.0",
    "typescript": "~2.0.0"
  }

@filipesilva
Copy link
Contributor

Closing as this does not happen with latest, to the best of my knowledge.

If you're still experiencing it, have a look at @beeman's excelent writeup in #4363 (comment) to be sure your dependencies are up to date.

@gridcellcoder
Copy link

In our case using 'npm --version 4.2.0 and node --version v7.10.0we had to make sure you we used and follow https://github.com/ReactiveX/rxjs#all-module-types-cjses6amdtypescript-via-npm because the package name changed to@reactivex/rxjs`

@noah2233
Copy link

noah2233 commented Jul 1, 2017

@crutchcorn you are my new king

@itLead797
Copy link

itLead797 commented Sep 22, 2017

followed the steps outlined by Beeman above. Still encountering the error

Error: Cannot find module 'rxjs/add/operator/filter'
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 Object. (D:\training\CodeCraftSchool\TinkerTime2\node_modules@angular-devkit\core\src\logger\cli-logger.js:10:1)
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)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ng serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

package.txt

Context: https://github.com/itLead797/TinkerTime2

@vedhaperi
Copy link

Try this for import:
import { Observable, Subject } from 'rxjs';

@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 8, 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